Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Fix bug #7300 (Prefs never saved again after opening ancestor folder of user prefs.json)#7376

Merged
peterflynn merged 1 commit intomasterfrom
pflynn/fix-userprefs-writes
Apr 2, 2014
Merged

Fix bug #7300 (Prefs never saved again after opening ancestor folder of user prefs.json)#7376
peterflynn merged 1 commit intomasterfrom
pflynn/fix-userprefs-writes

Conversation

@peterflynn
Copy link
Copy Markdown
Member

Fix bug #7300 -- ensure that FileSystem always knows we've read the JSON file before we try to write to it. We don't want to enable the 'blind' flag since it will mean we virtually always overwrite external changes to the prefs file, and we don't want to start using file watchers to observe external changes on the fly since we haven't yet deeply tested having multiple watch roots active at once (see #7375).

Also:

contains the user prefs JSON files in its subtree) - ensure that FileSystem
always knows we've read the JSON file before we try to write to it. We
don't want to enable the 'blind' flag since it will mean we virtually
always overwrite external changes to the prefs file, and we don't want to
start using file watchers to observe external changes on the fly since
we haven't yet deeply tested having multiple watch roots active at once.
- Rename confusing "filename" vars in PreferencesBase
- Fix JSLint errors in ProjectManager from #7026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: the preferred nomenclature is pathname

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it? I get 2x as many hits for 'filepath' in our codebase than 'pathname.' I'm not sure we've settled on any strict convention. I'm just certain that 'filename' is misleading here :-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or I wonder if it should be fullPath to harmonize with the FileSystem nomenclature?

@peterflynn
Copy link
Copy Markdown
Member Author

@dangoor Do you have cycles to review today, since this is in prefs code?

@dangoor
Copy link
Copy Markdown
Contributor

dangoor commented Apr 2, 2014

@peterflynn Sure, I will review this today.

@dangoor
Copy link
Copy Markdown
Contributor

dangoor commented Apr 2, 2014

Review complete. Everything looks fine to me and the change works well. I don't feel likely to be thrown off by any of the nomenclature we discussed, so I wouldn't block this PR on that. If you do want to change the name to pathname or fullPath, feel free to do so and merge without additional review.

@peterflynn
Copy link
Copy Markdown
Member Author

Thanks for the review! I'l just go ahead & land it now in the interest of getting on with the remaining sprint tasks...

peterflynn added a commit that referenced this pull request Apr 2, 2014
Fix bug #7300 (Prefs never saved again after opening ancestor folder of user prefs.json)
@peterflynn peterflynn merged commit 3286e7e into master Apr 2, 2014
@peterflynn peterflynn deleted the pflynn/fix-userprefs-writes branch April 2, 2014 20:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants