Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reload not triggered when profiles.json is a symlink #1812

Closed
newgene opened this issue Jul 3, 2019 · 2 comments
Closed

reload not triggered when profiles.json is a symlink #1812

newgene opened this issue Jul 3, 2019 · 2 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.

Comments

@newgene
Copy link

newgene commented Jul 3, 2019

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable): 0.2.1715.0

Any other software?

Steps to reproduce

I tried to keep profiles.json saved in my OneDrive, so I created a profiles.json symlink as the following:

DEL /Q %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json
mklink %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json %ONEDRIVE%\Windows\conf\WindowsTerminal\profiles.json

Expected behavior

It should work exactly like the actual profiles.json file: any modification will trigger the reload of the app.

Actual behavior

Windows Terminal works fine with the settings loaded from the created symlink, but when I modify the file content, it won't trigger any reload of the Terminal app. I have to close and relaunch the app in order to apply the modified settings.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 3, 2019
@DHowett-MSFT
Copy link
Contributor

So, here's the weird thing about file modifications. We can't subscribe to know when a file has been changed -- we must subscribe to know when its directory changed. The risk in following the symbolic link is that we will probably start listening for file changes in somewhere crazy (with a high event volume) like the user's home directory. ☹️

@newgene
Copy link
Author

newgene commented Jul 3, 2019

Understand.

I just gave another try with the "hard link" instead of "symbolic link":

mklink /H %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json %ONEDRIVE%\Windows\conf\WindowsTerminal\profiles.json

It works as expected, so it's not an issue for me anymore.

@carlos-zamora carlos-zamora added Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons. and removed Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Projects
None yet
Development

No branches or pull requests

3 participants