mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
Fix (workaround) for bug #1266.
This commit is contained in:
parent
85026f9895
commit
d6297ed01d
@ -10,6 +10,11 @@ This requires a patch to wxWidgets:
|
|||||||
|
|
||||||
accessibility.diff
|
accessibility.diff
|
||||||
|
|
||||||
|
In some cases (see bug #1266 and http://reviews.llvm.org/D13647#eeab044e), the
|
||||||
|
wxWidgets wxRenameFile function can fail. This patch provides a workaround:
|
||||||
|
|
||||||
|
fix_rename.diff
|
||||||
|
|
||||||
Other patches that need to be applied to wxWidgets 3.0.2. These should not
|
Other patches that need to be applied to wxWidgets 3.0.2. These should not
|
||||||
be required for later versions:
|
be required for later versions:
|
||||||
|
|
||||||
|
32
win/wxWidgets_additions/fix_rename.diff
Normal file
32
win/wxWidgets_additions/fix_rename.diff
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
--- orig/wxWidgets-3.0.2/src/common/filefn.cpp 2014-10-06 16:33:44.000000000 -0500
|
||||||
|
+++ wxWidgets-3.0.2/src/common/filefn.cpp 2015-12-21 03:00:28.542150200 -0600
|
||||||
|
@@ -1161,7 +1161,8 @@
|
||||||
|
bool
|
||||||
|
wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite)
|
||||||
|
{
|
||||||
|
- if ( !overwrite && wxFileExists(file2) )
|
||||||
|
+ bool exists = wxFileExists(file2);
|
||||||
|
+ if ( !overwrite && exists )
|
||||||
|
{
|
||||||
|
wxLogSysError
|
||||||
|
(
|
||||||
|
@@ -1174,8 +1175,17 @@
|
||||||
|
|
||||||
|
#if !defined(__WXWINCE__)
|
||||||
|
// Normal system call
|
||||||
|
- if ( wxRename (file1, file2) == 0 )
|
||||||
|
- return true;
|
||||||
|
+ unsigned long doserrno = 0;
|
||||||
|
+ for (int i = 0; i < 2000; i++)
|
||||||
|
+ {
|
||||||
|
+ if ( wxRename (file1, file2) == 0 )
|
||||||
|
+ return true;
|
||||||
|
+ unsigned long doserrno;
|
||||||
|
+ _get_doserrno(&doserrno);
|
||||||
|
+ if (doserrno != ERROR_ACCESS_DENIED && (doserrno == ERROR_ALREADY_EXISTS && exists))
|
||||||
|
+ break;
|
||||||
|
+ wxMilliSleep(1);
|
||||||
|
+ }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Try to copy
|
2069
win/wxWidgets_additions/wxWidgets-3.0.2/src/common/filefn.cpp
Normal file
2069
win/wxWidgets_additions/wxWidgets-3.0.2/src/common/filefn.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user