summaryrefslogtreecommitdiff
path: root/libs/pbd/file_utils.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-03-08 22:38:52 +1000
committerTim Mayberry <mojofunk@gmail.com>2015-03-08 22:46:26 +1000
commitf694b867c1eaa8b959db2f17a894900d0a972738 (patch)
tree786c6bff93d4273559b122b999e5dd2ea37d7fa6 /libs/pbd/file_utils.cc
parentb35504a71eb9fe58201745a5d6331612f9da4766 (diff)
Fix PBD::copy_file on windows to work with non-ascii paths
This breakage was indicated by the filesystem unit tests.
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 a15cd04cd4..5a0ffa928f 100644
--- a/libs/pbd/file_utils.cc
+++ b/libs/pbd/file_utils.cc
@@ -283,8 +283,8 @@ copy_file(const std::string & from_path, const std::string & to_path)
{
if (!Glib::file_test (from_path, Glib::FILE_TEST_EXISTS)) return false;
- PBD::ScopedFileDescriptor fd_from (::open (from_path.c_str(), O_RDONLY));
- PBD::ScopedFileDescriptor fd_to (::open (to_path.c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
+ PBD::ScopedFileDescriptor fd_from (g_open (from_path.c_str(), O_RDONLY, 0444));
+ PBD::ScopedFileDescriptor fd_to (g_open (to_path.c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
char buf[4096]; // BUFSIZ ??
ssize_t nread;