mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-12 17:43:37 +02:00
Revised workaround for bug #1266
This commit is contained in:
@@ -1175,6 +1175,10 @@ wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite)
|
||||
|
||||
#if !defined(__WXWINCE__)
|
||||
// Normal system call
|
||||
//
|
||||
// For explanation, see: (warning...based mostly on observed behavior)
|
||||
// http://bugzilla.audacityteam.org/show_bug.cgi?id=1266
|
||||
// https://github.com/audacity/audacity/pull/94
|
||||
unsigned long doserrno = 0;
|
||||
for (int i = 0; i < 2000; i++)
|
||||
{
|
||||
@@ -1182,8 +1186,8 @@ wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite)
|
||||
return true;
|
||||
unsigned long doserrno;
|
||||
_get_doserrno(&doserrno);
|
||||
if (doserrno != ERROR_ACCESS_DENIED && (doserrno == ERROR_ALREADY_EXISTS && exists))
|
||||
break;
|
||||
if (doserrno != ERROR_ACCESS_DENIED && (doserrno != ERROR_ALREADY_EXISTS || exists))
|
||||
break;
|
||||
wxMilliSleep(1);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user