Properties file question

I’m using juce 1.44, and my properties files are always showing up as folders rather than files, as they did under 1.41. My code looks like this:

File theFile (File::getSpecialLocation(File::userApplicationDataDirectory));
theFile = theFile.getChildFile(T(“foo”));
theFile = theFile.getChildFile(T(“bar”)).withFileExtension(T(".txt"));

PropertiesFile thePropertiesFile = new PropertiesFile(theFile, -1, PropertiesFile::storeAsXML);

Why is this creating a folder called bar.txt in the foo folder instead of a file?

I think that might be a bug in 1.44 - try getting the latest tip, where I seem to remember fixing it…

I put off testing this for a while, but just upgraded from 1.44 to 1.45, and I’m still seeing this behavior. My property files are showing up as empty folders rather than files.

I think as a result, there’s no data to read back in, so I’m getting default values for the properties that are stored.

Is there a fix for this issue?

I just tried your code and it worked perfectly (on windows)… ??

I found the error. There was an errant File::createDirectory() in there, a vestage of older code, which was causing the behavior I saw when I updated to 1.44.