diff --git a/src/PlatformCompatibility.cpp b/src/PlatformCompatibility.cpp index bb7ef59df..3e133ffae 100644 --- a/src/PlatformCompatibility.cpp +++ b/src/PlatformCompatibility.cpp @@ -44,22 +44,3 @@ const FilePath &PlatformCompatibility::GetExecutablePath() return path; } -FilePath PlatformCompatibility::ConvertSlashInFileName(const FilePath &filePath) -{ -#ifdef __WXMAC__ - wxString path = filePath; - wxString filename; - wxString newPath = filePath; - // int pathLen = 1; - while (!wxDirExists(wxPathOnly(newPath)) && ! path.empty()) { - path = newPath.BeforeLast('/'); - filename = newPath.AfterLast('/'); - newPath = path; - newPath += ':'; - newPath += filename; - } - return newPath; -#else - return filePath; -#endif -} diff --git a/src/PlatformCompatibility.h b/src/PlatformCompatibility.h index 4d1ce6677..9b9b68331 100644 --- a/src/PlatformCompatibility.h +++ b/src/PlatformCompatibility.h @@ -39,19 +39,6 @@ public: // This string is unchanging // static const FilePath &GetExecutablePath(); - - // - // Audacity treats the / as a file separator always for Mac OS, - // however /'s are allowed in the filename. In order for /'s to - // work they muse be treated as :'s. To facilitate this, this - // function should be called when opening or saving a file on - // the Mac. It's important to note that if a / is used in a filename - // and folder exists in the same folder with the same name as the part - // of the file (before the first /) then the file will be saved inside - // of that directory. This function also exists in the FileDialogPrivate - // object - // - static FilePath ConvertSlashInFileName(const FilePath& filePath); }; #endif diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index c65e27022..b41ed22dc 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -855,8 +855,7 @@ void ProjectFileManager::OpenFile(const FilePath &fileNameArg, bool addtohistory // On Win32, we may be given a short (DOS-compatible) file name on rare // occasions (e.g. stuff like "C:\PROGRA~1\AUDACI~1\PROJEC~1.AUP"). We // convert these to long file name first. - auto fileName = PlatformCompatibility::ConvertSlashInFileName( - PlatformCompatibility::GetLongFileName(fileNameArg)); + auto fileName = PlatformCompatibility::GetLongFileName(fileNameArg); if (TempDirectory::FATFilesystemDenied(fileName, XO("Project resides on FAT formatted drive.\n" @@ -889,6 +888,7 @@ void ProjectFileManager::OpenFile(const FilePath &fileNameArg, bool addtohistory return; } +printf("fileexists %d\n", wxFileExists(fileName)); if (!::wxFileExists(fileName)) { AudacityMessageBox( XO("Could not open file: %s").Format( fileName ),