Overwrite target file in PBD::copy_file
authorTim Mayberry <mojofunk@gmail.com>
Sat, 23 Jun 2012 05:07:52 +0000 (05:07 +0000)
committerTim Mayberry <mojofunk@gmail.com>
Sat, 23 Jun 2012 05:07:52 +0000 (05:07 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12854 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/pbd/file_utils.cc
libs/pbd/pbd/file_utils.h

index 956b7002cbd12bcdd2234ca7d42f421e96431080..f323ebcb69715d781f2b7a408f68c70a453d57d9 100644 (file)
@@ -139,7 +139,7 @@ copy_file(const std::string & from_path, const std::string & to_path)
 
        try
        {
-               from_file->copy (to_file);
+               from_file->copy (to_file, Gio::FILE_COPY_OVERWRITE);
        }
        catch(const Glib::Exception& ex)
        {
index 8f5b6d1e25bf15b4b74e21ae188c5bd4275380aa..475ddb982855d00d4a8f126be6d00a1adae6a644 100644 (file)
@@ -93,7 +93,7 @@ find_file_in_search_path (const SearchPath& search_path,
 
 /**
  * Attempt to copy the contents of the file from_path to a new file
- * at path to_path.
+ * at path to_path. If to_path exists it is overwritten.
  *
  * @return true if file was successfully copied
  */