Page 1 of 1

0.86: Opening subdirectory of directory symbolic link from thumbnails pane changes path to the target of the symlink

Posted: Sat Jun 03, 2017 3:17 am
by young
After browsing to a directory symbolic link, opening a subdirectory from the thumbnails pane causes XnViewMP to change the current directory to the target of the symlink.

For example, create the folder structure and directory symlink from the Windows command-line:

Code: Select all

    mkdir parent
    mkdir parent\subdir
    mklink /d symlink parent
Now watch the current directory textbox as you browse:
  • Browse to the symlink directory. The current directory is: symlink.
  • Double-click subdir in the thumbnails pane. The current directory should change to symlink\subdir. However, it actually becomes parent\subdir!
  • Go back to the Folders pane and click the + to expand symlink.
  • Click on subdir in the Folders pane. The current directory is now correct: symlink\subdir
Because of the inconsistent behavior, it's very easy to end up with two copies of every image in the XnView MP database. Ratings and categories will not show up if you browse to the subdirectory using a different method.

The correct behavior is to preserve the path relative to the current directory. If the current directory is a symlink, then the subdirectory should be appended to the symlink path. XnView MP should not traverse the symlink and go to the physical directory.

This is a multiplatform bug. XnView MP has the same problem with directory symlinks on Linux.

Re: 0.86: Opening subdirectory of directory symbolic link from thumbnails pane changes path to the target of the symlink

Posted: Fri Apr 14, 2023 3:12 pm
by Zottt
I confirm!
XNViewMP handles symlinks different from XNView.
I use windows symbolic links to organize my picture's folders.
XNView respects the symlinks and just opens them transparently, whereas XNViewMP jumps into the target folder.
As a result the entries in xnview.db don't match any more :(

Is there a switch to change this behaviour?

Re: 0.86: Opening subdirectory of directory symbolic link from thumbnails pane changes path to the target of the symlink

Posted: Fri Apr 14, 2023 8:45 pm
by Zottt
Actually it appears to be a bit inconsistent.
I tested with the current version 1.4.3 (sorry for using this thread! Should i create a new topic instead?)
If you click on the symlink in the frame showing the preview-images and the path atop then XNViewMP jumps to the target folder.
If - instead - you click the symlink in the navigation frame it follows the symlink as expected.

Re: 0.86: Opening subdirectory of directory symbolic link from thumbnails pane changes path to the target of the symlink

Posted: Wed May 03, 2023 2:33 pm
by xnview
yes please create a new post and how to reproduce

Re: 0.86: Opening subdirectory of directory symbolic link from thumbnails pane changes path to the target of the symlink

Posted: Wed May 03, 2023 4:41 pm
by young
I gave the repro steps 5 years ago, including the inconsistency between the thumbnails pane and the folders pane.