mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-06 14:52:34 +02:00
Bug 1220: Backslashes wrong for Mac
On Mac the path separator is different. so conditional code to handle that.
This commit is contained in:
parent
07090e691b
commit
0f597ae98e
@ -1584,9 +1584,15 @@ bool AudacityApp::IsTempDirectoryNameOK( const wxString & Name ){
|
||||
// use Long Path to expand out any abbreviated long substrings.
|
||||
wxString BadPath = tmpFile.GetLongPath();
|
||||
::wxRemoveFile(tmpFile.GetFullPath());
|
||||
#ifdef __WXMAC__
|
||||
BadPath = BadPath.BeforeLast( '/' ) + "/";
|
||||
wxFileName cmpFile( Name );
|
||||
wxString NameCanonical = cmpFile.GetLongPath( ) + "/";
|
||||
#else
|
||||
BadPath = BadPath.BeforeLast( '\\' ) + "\\";
|
||||
wxFileName cmpFile( Name );
|
||||
wxString NameCanonical = cmpFile.GetLongPath( ) + "\\";
|
||||
#endif
|
||||
return !(NameCanonical.StartsWith( BadPath ));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user