mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-09 04:30:09 +00:00
This commit is contained in:
parent
78b5d2994e
commit
08cde09921
9 changed files with 164 additions and 99 deletions
|
|
@ -144,13 +144,23 @@ bool PropertiesFile::saveIfNeeded()
|
|||
return (! needsWriting) || save();
|
||||
}
|
||||
|
||||
bool PropertiesFile::needsToBeSaved() const throw()
|
||||
{
|
||||
const ScopedLock sl (getLock());
|
||||
|
||||
return needsWriting;
|
||||
}
|
||||
|
||||
|
||||
bool PropertiesFile::save()
|
||||
{
|
||||
const ScopedLock sl (getLock());
|
||||
|
||||
stopTimer();
|
||||
|
||||
if (file == File::nonexistent || file.isDirectory())
|
||||
if (file == File::nonexistent
|
||||
|| file.isDirectory()
|
||||
|| ! file.getParentDirectory().createDirectory())
|
||||
return false;
|
||||
|
||||
if ((options & storeAsXML) != 0)
|
||||
|
|
@ -292,7 +302,9 @@ PropertiesFile* PropertiesFile::createDefaultAppPropertiesFile (const String& ap
|
|||
folderName,
|
||||
commonToAllUsers));
|
||||
|
||||
if (file == File::nonexistent || ! file.getParentDirectory().createDirectory())
|
||||
jassert (file != File::nonexistent);
|
||||
|
||||
if (file == File::nonexistent)
|
||||
return 0;
|
||||
|
||||
return new PropertiesFile (file, millisecondsBeforeSaving, propertiesFileOptions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue