microsoft / winfile

Original Windows File Manager (winfile) with enhancements
MIT License
6.75k stars 698 forks source link

Tree pane updates when SymlinkDirs are created #406

Closed schinagl closed 6 months ago

schinagl commented 8 months ago

When creating symlink dirs, the left tree pane didn' get updated. This was caused by sending the wrong FSC code.

malxau-msft commented 8 months ago

Sorry for the delay, I just got to look at this now.

Some observations:

  1. The user can hide junctions. This change will always update the left pane with a newly created junction even if hiding is enabled.
  2. Similar to the above, a newly created junction in Winfile inherits the file attributes of the destination. This means a new junction can be hidden/system, and will be displayed if junction hiding is off but hidden/system hiding is on.

I think the previous FSC_MKDIR code didn't need to think about this, because I can't find a way to create directories that are hidden/system, and the user can't hide directories.

Unrelated to this change, but related to the scenario and found trying things out:

  1. File Manager uses FindFirstChangeNotification to monitor for file system changes. Directory (and junction) creations outside of Winfile update the right pane but not the left pane.
  2. It only monitors for changes within the directory that's opened, so has no way to be informed of a directory change that would be displayed in the left pane but is not within the opened directory. This type of monitoring can be expensive so there's a good argument to not do it. I think FILE_NOTIFY_CHANGE_DIR_NAME exists to facilitate this type of UI, so a program can be informed of any directory change on a volume without being informed of every file change on a volume.
schinagl commented 8 months ago

Reverted tree pane update for junctions. This will be a spereate PR

schinagl commented 7 months ago

Since junction display was split of from this PR, this should be an easy one now....

schinagl commented 7 months ago

Sorry for the delay. I've been looking into this, and the symlink one, and both still have the issue where if the user is hiding hidden and system files, links get included in the left pane.

Please do not mix up things!

Symbolic Links Dirs are shown regardless of any View/ByFileType setting of 'Hidden or System File/Junctions' So your above quoted comment is wrong.

I intentionally split off an extra PR for Junction behaviour (#409)

This PR only

So you can approve this one.

schinagl commented 6 months ago

I am leaving this Winfile Repo, no need to merge