D10990: Add "Open symlink destination folder" into symlink's context menu

Henrik Fehlauer noreply at phabricator.kde.org
Tue Mar 6 22:29:43 GMT 2018


rkflx added a comment.


  In D10990#220293 <https://phabricator.kde.org/D10990#220293>, @ngraham wrote:
  
  > Ah, you're right. Perhaps I've exposed a bug in `KIO::highlightInFileManager()` or how it's being called, because for most directory symlinks, it works as expected, but not for this one that I have:
  >
  >   $ ls -la ~/nate_shared
  >   lrwxrwxrwx 1 dev dev 15 Feb  1 21:10 /home/dev/nate_shared -> /media/sf_nate/
  >
  >
  > Invoking Show Original on `~/nate_shared` opens a new window showing the contents of `/media/sf_nate` instead of opening `/media` and highlighting `sf_nate`.
  >
  > Bug in `KIO::highlightInFileManager()`, or a bug in the implementation here?
  
  
  This is easy to reproduce:
  
    mkdir a
    ln -s a link1
    ln -s a/ link2
    ls -la
  
  Dolphin creates the first kind of link, which works fine. The other type was probably created by other means.
  
  Is it a bug in KIO? Not really. As a developer, I want to be able to decide for myself what I want to open: Either the folder itself, or the parent folder with the subfolder highlighted. We could change KIO to strip the `/` and add a parameter for the behaviour, but that's quite complicated and in most cases the developer has to decide anyway how to handle the situation.
  
  @rominf Here we could just use `QUrl::StripTrailingSlash`.
  
  Also, there is still something odd: For me the patch even wants to open `a/a` instead of `a` and obviously fails for that. Adding `qDebug()`, we get `QUrl("file:a/")`, meaning the handling of relative symlinks is broken in this patch.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D10990

To: rominf, #dolphin, ngraham
Cc: rkflx, ngraham, elvisangelaccio, markg, #dolphin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180306/568d668b/attachment.htm>


More information about the kfm-devel mailing list