mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
Ensure export starts with a clean state
This commit is contained in:
parent
0034ecfe49
commit
f23bb163a8
1 changed files with 6 additions and 0 deletions
|
|
@ -193,6 +193,9 @@ SndfileHandle::SndfileHandle (const char *path, int mode, int fmt, int chans, in
|
|||
if (mode & SFM_WRITE) {
|
||||
writable = true;
|
||||
}
|
||||
if (writable) {
|
||||
::g_unlink (path);
|
||||
}
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
int fd = g_open (path, writable ? O_CREAT | O_RDWR : O_RDONLY, writable ? 0644 : 0444);
|
||||
#else
|
||||
|
|
@ -225,6 +228,9 @@ SndfileHandle::SndfileHandle (std::string const & path, int mode, int fmt, int c
|
|||
if (mode & SFM_WRITE) {
|
||||
writable = true;
|
||||
}
|
||||
if (writable) {
|
||||
::g_unlink (path.c_str());
|
||||
}
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
int fd = g_open (path.c_str(), writable ? O_CREAT | O_RDWR : O_RDONLY, writable ? 0644 : 0444);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue