mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
hide issues with g_close() not being available in somewhat older versions of glib
This commit is contained in:
parent
3a1071e5e9
commit
5188f02cfe
1 changed files with 2 additions and 4 deletions
|
|
@ -491,10 +491,8 @@ toggle_file_existence (string const & path)
|
|||
return g_unlink (path.c_str());
|
||||
}
|
||||
|
||||
int fd = g_open (path.c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666);
|
||||
GError* err;
|
||||
g_close (fd, &err);
|
||||
return !(fd >= 0);
|
||||
PBD::ScopedFileDescriptor fd = g_open (path.c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666);
|
||||
return !((int) fd >= 0);
|
||||
}
|
||||
|
||||
} // namespace PBD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue