summaryrefslogtreecommitdiff
path: root/libs/pbd/file_utils.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-12-10 18:28:55 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-12-10 18:28:55 -0500
commit294b99aabf3eb96323a3159b7a5e1b4bfc1ff04a (patch)
treedbb6bfba564d2979c8cebbfebe162a9659dff5aa /libs/pbd/file_utils.cc
parent17707b9674958391949e59a724a264cdcc2d65ff (diff)
remove file manager LRU cache from code.
This was a very clever attempt to fix a non-problem. If the platform doesn't have enough file descriptors available then the platform is broken and we're not going to hack around trying to fix it.
Diffstat (limited to 'libs/pbd/file_utils.cc')
-rw-r--r--libs/pbd/file_utils.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc
index 849d7f05fd..89f6818704 100644
--- a/libs/pbd/file_utils.cc
+++ b/libs/pbd/file_utils.cc
@@ -50,7 +50,6 @@
#endif
#include "pbd/compose.h"
-#include "pbd/file_manager.h"
#include "pbd/file_utils.h"
#include "pbd/debug.h"
#include "pbd/error.h"
@@ -282,11 +281,9 @@ copy_file(const std::string & from_path, const std::string & to_path)
{
if (!Glib::file_test (from_path, Glib::FILE_TEST_EXISTS)) return false;
- FdFileDescriptor from_file(from_path, false, 0444);
- FdFileDescriptor to_file(to_path, true, 0666);
+ int fd_from (::open (from_path.c_str(), O_RDONLY));
+ int fd_to (::open (to_path.c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
- int fd_from = from_file.allocate ();
- int fd_to = to_file.allocate ();
char buf[4096]; // BUFSIZ ??
ssize_t nread;