mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a doNotSave option to PropertiesFile
This commit is contained in:
parent
abd3babc02
commit
d42783465b
2 changed files with 6 additions and 1 deletions
|
|
@ -37,6 +37,7 @@ namespace PropertyFileConstants
|
|||
PropertiesFile::Options::Options()
|
||||
: commonToAllUsers (false),
|
||||
ignoreCaseOfKeyNames (false),
|
||||
doNotSave (false),
|
||||
millisecondsBeforeSaving (3000),
|
||||
storageFormat (PropertiesFile::storeAsXML),
|
||||
processLock (nullptr)
|
||||
|
|
@ -163,7 +164,8 @@ bool PropertiesFile::save()
|
|||
|
||||
stopTimer();
|
||||
|
||||
if (file == File::nonexistent
|
||||
if (options.doNotSave
|
||||
|| file == File::nonexistent
|
||||
|| file.isDirectory()
|
||||
|| ! file.getParentDirectory().createDirectory())
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue