Skip to content
Snippets Groups Projects
Commit 839226a3 authored by Christopher Stawarz's avatar Christopher Stawarz
Browse files

On OS X, the default data directory is now ~/Documents/open-ephys, which is...

On OS X, the default data directory is now ~/Documents/open-ephys, which is created if it doesn't exist
parent 36f4c8ca
Branches
Tags
No related merge requests found
......@@ -426,17 +426,17 @@ ControlPanel::ControlPanel(ProcessorGraph* graph_, AudioComponent* audio_)
addChildComponent(newDirectoryButton);
File executable = File::getSpecialLocation(File::currentExecutableFile);
#if defined(__APPLE__)
const String executableDirectory =
executable.getParentDirectory().getParentDirectory().getParentDirectory().getParentDirectory().getFullPathName();
const File dataDirectory = File::getSpecialLocation(File::userDocumentsDirectory).getChildFile("open-ephys");
if (!dataDirectory.isDirectory()) {
dataDirectory.createDirectory();
}
#else
const String executableDirectory = executable.getParentDirectory().getFullPathName();
const File dataDirectory = File::getSpecialLocation(File::currentExecutableFile).getParentDirectory();
#endif
filenameComponent = new FilenameComponent("folder selector",
executableDirectory,
dataDirectory.getFullPathName(),
true,
true,
true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment