diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp index bd14b66d66..10a43dbca7 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp @@ -98,8 +98,9 @@ File PropertiesFile::Options::getDefaultFile() const : applicationName); #endif - return dir.getChildFile (applicationName) - .withFileExtension (filenameSuffix); + return (filenameSuffix.startsWithChar (L'.') + ? dir.getChildFile (applicationName).withFileExtension (filenameSuffix) + : dir.getChildFile (applicationName + "." + filenameSuffix)); } diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h index c91d61c54e..8c7f51df37 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h @@ -67,7 +67,11 @@ public: /** The suffix to use for your properties file. It doesn't really matter what this is - you may want to use ".settings" or - ".properties" or something. + ".properties" or something. If the suffix includes the prefixing dot (for example + ".settings") then the suffix of applicationName will be replaced with your suffix + ("MyApp.exe" -> "MyApp.settings"). If your filenameSuffix does NOT include the dot, + then the suffix will be appended to the applicationName ("MyApp.exe" -> + "MyApp.settings.exe"). */ String filenameSuffix;