> On Aug. 3, 2012, 8:49 a.m., David Faure wrote: > > "Actually we need to test both source and destination to check if their > > protocols support symlink creation." > > > > Haha, if we're copying a symlink, then obviously the source protocol > > supports symlinks, otherwise it wouldn't be there in the first place :-) > > Lamarque Vieira Souza wrote: > I meant supports *creating* symlinks, not only *showing* symlinks. ftp > kio protocol does not support creating symlinks according to its ftp.protocol > file. > > David Faure wrote: > So? If you're copying a symlink *from* FTP to the local harddrive, what > should it matter, that kio_ftp cannot *create* symlinks? The symlink is > there, it exists, so checking whether kio_ftp can create symlinks is totally > irrelevant. Only the capability of the destination protocol matters, not the > one of the source protocol.
I am using that heuristics to avoid the symlink with ftp problem to come back (bug #5601). If I just test the destination protocol it will always create a symlink if the destination protocol is "file". We could call KIO::symlink() if both source and destination are local, do you know a way to detect that besides checking if QUrl::host() is empty? - Lamarque Vieira ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/105831/#review16814 ----------------------------------------------------------- On Aug. 2, 2012, 9:31 p.m., Lamarque Vieira Souza wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/105831/ > ----------------------------------------------------------- > > (Updated Aug. 2, 2012, 9:31 p.m.) > > > Review request for kdelibs. > > > Description > ------- > > Some kio protocols support creating symlinks but a change in > kio/kio/copyjob.cpp hardcoded symlink creation to only when source and > destination protocols are the same. That change was added to fix a problem > with ftp protocol creating symlinks instead of copying files (there is a > comment in the source code about that). I think instead of forcing source and > destination use the same protocol we should test if the destination protocol > supports creating symlinks (ftp protocol does not). That would allow kio's > like fish and nfs create symlinks. I am also working on some other changes > that could use this feature. > > > Diffs > ----- > > kio/kio/copyjob.cpp 8dde763 > > Diff: http://git.reviewboard.kde.org/r/105831/diff/ > > > Testing > ------- > > > Thanks, > > Lamarque Vieira Souza > >
