-
Notifications
You must be signed in to change notification settings - Fork 7.6k
File watching doesn't work for external edits made through symlinked folder #6692
Comments
Oh, I thought I had edited this, but I guess I didn't save the edits. It's only happening if you have the file opened through a symlinked folder. I don't think it's a stop ship for 36. I'll fix it again. |
Nominating for 1.0. Symlinks are pretty common on Unix, and the fact that we miss watcher events in this case seems like it could lead to data loss. |
Reviewed - keeping in 1.0 to investigate whether there's a cheap way to have symlinked files/folders treated as non-watched files (which would allow the file to update in step 4). This may be technically difficult, however. We also considered whether there's anything simple we can do to indicate that a file isn't watched (which would include both symlinked items, once the above is fixed, as well as files outside the project root and files inside the project but filtered out by the watch-root filter)... but that seems less critical. Unwatched files that we correctly treat as unwatched (unlike the bug above) aren't so badly behaved anyway. |
Reassigning to @peterflynn |
To fix this, we need to get
So there would be some native work to fix this. Adding 'needs review' to evaluate if we want to take that on for 1.0 or not. |
Note: to test this on Mac or Win you need to be a little bit careful: the native Open dialogs on both OSes automatically normalize out symlinks if you click into one directly. If you use File > Open to open a file inside a symlinked folder, Brackets will be handed the real path instead; similar if you use File > Open Folder to open a symlink as the root of the project. The best way I've figured out to actually expose Brackets to a symlink is to have the root of your project be a regular folder that contains a symlink as a child. Then expanding the symlink in the Brackets folder tree lets you access files using the symlinked path. |
Reviewed and opted for "not 1.0". (Removing needs review label). Thanks for the extra notes on this, Peter! |
…ead of opening it in Brackets, to avoid opening a symlink path and hitting #6692.
Avoid "Debug > Open Brackets Source" hitting symlink bug #6692
[Updated to indicate that this is because of symlinks]
Result: No dialog, no auto-refresh of file.
The text was updated successfully, but these errors were encountered: