summaryrefslogtreecommitdiff
path: root/libs/pbd/file_utils.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2014-06-25 09:40:26 +1000
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-25 12:40:11 -0400
commit8da304be0946013a6da27953c0679fc0349f5013 (patch)
treee52bee0e54deb9aa02d3828dfd07be1cbd8cac57 /libs/pbd/file_utils.cc
parent4ced10bfe564168c5844cc4817c174f31db7393c (diff)
Fix PBD::copy_file so it works with non-ASCII filenames on windows
Diffstat (limited to 'libs/pbd/file_utils.cc')
-rw-r--r--libs/pbd/file_utils.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc
index fd98cb733f..b3f2256731 100644
--- a/libs/pbd/file_utils.cc
+++ b/libs/pbd/file_utils.cc
@@ -294,12 +294,12 @@ copy_file(const std::string & from_path, const std::string & to_path)
char buf[4096]; // BUFSIZ ??
ssize_t nread;
- fd_from = ::open(from_path.c_str(), READ_FLAGS);
+ fd_from = g_open(from_path.c_str(), READ_FLAGS, 0444);
if (fd_from < 0) {
goto copy_error;
}
- fd_to = ::open(to_path.c_str(), WRITE_FLAGS, 0666);
+ fd_to = g_open(to_path.c_str(), WRITE_FLAGS, 0666);
if (fd_to < 0) {
goto copy_error;
}