mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 16:11:14 +02:00
Improve the message for exhaustion of file storage on Windows
This commit is contained in:
parent
2d17ddc100
commit
68706c24c9
@ -50,15 +50,24 @@ _("Audacity successfully wrote a file in %s but failed to rename it as %s.");
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wxString target = fileName.GetVolume();
|
wxString target;
|
||||||
if (target.empty()) {
|
|
||||||
// Shorten the path, arbitrarily to 3 components
|
#ifdef __WXMSW__
|
||||||
auto path = fileName;
|
|
||||||
path.SetFullName(wxString{});
|
// Drive letter plus colon
|
||||||
while(path.GetDirCount() > 3)
|
target = fileName.GetVolume() + wxT(":");
|
||||||
path.RemoveLastDir();
|
|
||||||
target = path.GetFullPath();
|
#else
|
||||||
}
|
|
||||||
|
// Shorten the path, arbitrarily to 3 components
|
||||||
|
auto path = fileName;
|
||||||
|
path.SetFullName(wxString{});
|
||||||
|
while(path.GetDirCount() > 3)
|
||||||
|
path.RemoveLastDir();
|
||||||
|
target = path.GetFullPath();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
return wxString::Format(
|
return wxString::Format(
|
||||||
format, target, renameTarget.GetFullName() );
|
format, target, renameTarget.GetFullName() );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user