diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2015-07-25 20:52:52 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2015-07-25 23:14:51 +1000 |
commit | 544be3ebe8afb2a45b8c9855d9777b29ad22f43b (patch) | |
tree | 30625d6a7f50bfb623b807c36fd66f69a58140c5 /libs/ardour/audiosource.cc | |
parent | e88f74cbb0411e38aaae9cbd48d1b7f0c55b2e2a (diff) |
Use g_open instead of ::open in AudioSource for portability
This is only really for Windows as g_open and ::open are the same thing on
other platforms
Diffstat (limited to 'libs/ardour/audiosource.cc')
-rw-r--r-- | libs/ardour/audiosource.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index cf36a9155e..d9e7c938b9 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -392,7 +392,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t } } - ScopedFileDescriptor sfd (::open (peakpath.c_str(), O_RDONLY)); + ScopedFileDescriptor sfd (g_open (peakpath.c_str(), O_RDONLY, 0444)); if (sfd < 0) { error << string_compose (_("Cannot open peakfile @ %1 for reading (%2)"), peakpath, strerror (errno)) << endmsg; @@ -775,7 +775,7 @@ AudioSource::build_peaks_from_scratch () int AudioSource::prepare_for_peakfile_writes () { - if ((_peakfile_fd = open (peakpath.c_str(), O_CREAT|O_RDWR, 0664)) < 0) { + if ((_peakfile_fd = g_open (peakpath.c_str(), O_CREAT|O_RDWR, 0664)) < 0) { error << string_compose(_("AudioSource: cannot open peakpath (c) \"%1\" (%2)"), peakpath, strerror (errno)) << endmsg; return -1; } |