Draft patch for mtime, symlink attribute and symlink path
arvid at cs.umu.se
arvid at cs.umu.se
Thu Jun 25 09:18:19 UTC 2009
boost::filesystem::path sym_pth (symlink_path);
that line is not used, you should remove it.
case 'l': e.symlink_attribute = true; break;
these lines should be changed to:
case 'l': e.symlink_attribute = true; e.size = 0; break;
It is absolutely critical that symbolic links are never written to by
libtorrent, so the size needs to be enforced to be 0.
fs::path symlink_pth ("");
you don't actually have to explicitly construct the path, you can just pass ""
directly to the function.
Also, could you make a patch against the current trunk?
Quoting Atul Aggarwal <atul.aggarwal.cse05 at itbhu.ac.in>:
> I am attaching draft patch. However, i need to discuss some points regarding
> patch.
>
> 1. Initially, i thought of making symlink path in the same format as the
> path is stored in the torrent file but it looks like symlink should be more
> easily stored as string rather than path format. Is this makes some sense or
> should i store that in path format? (I had some problem symlink_path as path
> format for paths like ../../abc)
> 2. If string is okay, then should i change the signature of all the function
> to match std::string rather than boost::filesystem::path (currently).
> 3. I have used "symlink path" for the storage key in the torrent file
> whenever i have symlink_attribute set.
> 4. This patch stores the symlink_path upto MAX_SYMLINK_PATH (in
> create_torrent.cpp) and doesnot trunkate the symlinks and stores empty
> string in the torrent file, however, i am not able to throw an warning while
> creating torrent. Any idea how to do that?
>
> Any suggestions regarding patch or some more questions?
>
> --
> Regards,
>
> Atul Aggarwal
>
--
More information about the instantmirror-list
mailing list