mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Bug 1899 - Fix path not terminated with separator issue.
This led Audacity to think a directory existed when it did not.
This commit is contained in:
parent
71a2683c5f
commit
750014d655
@ -398,7 +398,7 @@ wxFileNameWrapper FileNames::DefaultToDocumentsFolder(const wxString &preference
|
|||||||
// IF the prefs directory doesn't exist - (Deleted by our user perhaps?)
|
// IF the prefs directory doesn't exist - (Deleted by our user perhaps?)
|
||||||
// or exists as a file
|
// or exists as a file
|
||||||
// THEN fallback to using the default directory.
|
// THEN fallback to using the default directory.
|
||||||
bIsDefaultPath = !IsPathAvailable( result.GetPath(wxPATH_GET_VOLUME ) );
|
bIsDefaultPath = !IsPathAvailable( result.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR ) );
|
||||||
if( bIsDefaultPath )
|
if( bIsDefaultPath )
|
||||||
{
|
{
|
||||||
result.SetPath( defaultPath.GetPath( wxPATH_GET_VOLUME ) );
|
result.SetPath( defaultPath.GetPath( wxPATH_GET_VOLUME ) );
|
||||||
|
@ -4404,7 +4404,7 @@ bool AudacityProject::SaveAs(bool bWantSaveCopy /*= false*/, bool bLossless /*=
|
|||||||
bWantSaveCopy = true;
|
bWantSaveCopy = true;
|
||||||
|
|
||||||
// Bug 1304: Set a default file path if none was given. For Save/SaveAs
|
// Bug 1304: Set a default file path if none was given. For Save/SaveAs
|
||||||
if( !FileNames::IsPathAvailable( filename.GetFullPath() ) ){
|
if( !FileNames::IsPathAvailable( filename.GetPath( wxPATH_GET_VOLUME| wxPATH_GET_SEPARATOR) ) ){
|
||||||
bHasPath = false;
|
bHasPath = false;
|
||||||
filename = FileNames::DefaultToDocumentsFolder(wxT("/SaveAs/Path"));
|
filename = FileNames::DefaultToDocumentsFolder(wxT("/SaveAs/Path"));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user