From e0712d4cedfe7c2082028fb71bb571075e9e812a Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 28 Apr 2014 10:10:53 +0100 Subject: [PATCH] In PropertiesFile, allowed the osxLibrarySubfolder path to include a sub-folder. --- .../app_properties/juce_PropertiesFile.cpp | 5 +++-- .../app_properties/juce_PropertiesFile.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp index f20b1447ce..ece2121f3c 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp @@ -53,7 +53,7 @@ File PropertiesFile::Options::getDefaultFile() const File dir (commonToAllUsers ? "/Library/" : "~/Library/"); - if (osxLibrarySubFolder != "Preferences" && osxLibrarySubFolder != "Application Support") + if (osxLibrarySubFolder != "Preferences" && ! osxLibrarySubFolder.startsWith ("Application Support")) { /* The PropertiesFile class always used to put its settings files in "Library/Preferences", but Apple have changed their advice, and now stipulate that settings should go in "Library/Application Support". @@ -61,7 +61,8 @@ File PropertiesFile::Options::getDefaultFile() const Because older apps would be broken by a silent change in this class's behaviour, you must now explicitly set the osxLibrarySubFolder value to indicate which path you want to use. - In newer apps, you should always set this to "Application Support". + In newer apps, you should always set this to "Application Support" + or "Application Support/YourSubFolderName". If your app needs to load settings files that were created by older versions of juce and you want to maintain backwards-compatibility, then you can set this to "Preferences". diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h index dc8929aa28..f3d9551b11 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h @@ -85,7 +85,8 @@ public: Because older apps would be broken by a silent change in this class's behaviour, you must now explicitly set the osxLibrarySubFolder value to indicate which path you want to use. - In newer apps, you should always set this to "Application Support". + In newer apps, you should always set this to "Application Support" or + "Application Support/YourSubFolderName". If your app needs to load settings files that were created by older versions of juce and you want to maintain backwards-compatibility, then you can set this to "Preferences".