Skip to content

Commit e956564

Browse files
committed
Extra checks to make sure we store a valid path for last browser location
1 parent bfa3a83 commit e956564

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Utility/SettingsFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ ValueTree SettingsFile::getTheme(String const& name) const
244244

245245
void SettingsFile::setLastBrowserPathForId(String const& identifier, File& path)
246246
{
247-
if (identifier.isEmpty())
247+
if (identifier.isEmpty() || !path.exists() || path.isRoot())
248248
return;
249249

250250
settingsTree.getChildWithName("LastBrowserPaths").setProperty(identifier, path.getFullPathName(), nullptr);

0 commit comments

Comments
 (0)