From 97bf72ddb4136cc15a7d1aa03085989c128e881b Mon Sep 17 00:00:00 2001 From: James Crook Date: Wed, 18 Jan 2017 14:19:06 +0000 Subject: [PATCH] Bug 1304 - Starting Save or Export directory is not set, so is unwritable or requires authentication for most users Covers the case of Export Multiple too. --- src/export/ExportMultiple.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index ee0262541..f1db5ffea 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -237,6 +237,17 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S) } } + + // Bug 1304: Set the default file path. It's used if none stored in config. + wxFileName filename("foo"); + filename.AssignHomeDir(); +#ifdef __WIN32__ + filename.SetPath(filename.GetPath() + "\\Documents"); +#else + filename.SetPath(filename.GetPath() + "/Documents"); +#endif + wxString DefaultPath = filename.GetPath(); + if (mPluginIndex == -1) { mPluginIndex = 0; @@ -255,7 +266,7 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S) mDir = S.Id(DirID) .TieTextBox(_("Folder:"), wxT("/Export/MultiplePath"), - gPrefs->Read(wxT("/Export/Path"), ::wxGetCwd()), + gPrefs->Read(wxT("/Export/Path"), DefaultPath ), 64); S.Id(ChooseID).AddButton(_("Choose...")); S.Id(CreateID).AddButton(_("Create"));