boost::filesystem::coy_option is deprecated.
authorHyungju Lee <leee.lee@samsung.com>
Fri, 15 Mar 2024 00:22:46 +0000 (09:22 +0900)
committer조웅석/MDE Lab(SR)/삼성전자 <ws77.cho@samsung.com>
Fri, 15 Mar 2024 01:10:01 +0000 (10:10 +0900)
    // Deprecated, use copy_options instead
    enum class copy_option
    {
      none = copy_options::none,
      fail_if_exists = none,
      overwrite_if_exists = copy_options::overwrite_existing
    };

NativeLauncher/util/utils.cc

index a60b53c..c729395 100644 (file)
@@ -597,7 +597,7 @@ bool copyDir(const bf::path& path1, const bf::path& path2, FSFlag flags)
                                        destination = bf::unique_path(target.parent_path() / "%%%%-%%%%-%%%%-%%%%");
                                }
                                if (flags & FS_MERGE_OVERWRITE) {
-                                       bf::copy_file(current, destination, bf::copy_option::overwrite_if_exists);
+                                       bf::copy_file(current, destination, bf::copy_options::overwrite_existing);
                                } else {
                                        bf::copy_file(current, destination);
                                }
@@ -626,7 +626,7 @@ bool copyFile(const bf::path& path1, const bf::path& path2)
        if (!exist(path1)) {
                return false;
        }
-       bf::copy_file(path1, path2, bf::copy_option::overwrite_if_exists, error);
+       bf::copy_file(path1, path2, bf::copy_options::overwrite_existing, error);
        if (error) {
                _ERR("copy file %s due to error [%s]", path1.c_str(), error.message().c_str());
                return false;
@@ -643,7 +643,7 @@ bool moveFile(const bf::path& path1, const bf::path& path2)
        bf::rename(path1, path2, error);
        if (error) {
                _ERR("Cannot move file: %s. Will copy/remove... with error [%s]", path1.c_str(), error.message().c_str());
-               bf::copy_file(path1, path2, bf::copy_option::overwrite_if_exists, error);
+               bf::copy_file(path1, path2, bf::copy_options::overwrite_existing, error);
                if (error) {
                        _ERR("Cannot copy file %s due to error [%s]", path1.c_str(), error.message().c_str());
                        return false;