Skip to content

Commit

Permalink
fix: fix build error of deprecated api
Browse files Browse the repository at this point in the history
Build failed on Trime procject with boost 1.83.0

This error begins on upstream librime(0d12d90) and boost 1.83.0

/trime/app/src/main/jni/librime/src/rime/lever/customizer.cc:91:11: error: 'copy_file' is deprecated: Use copy_options instead of copy_option [-Werror,-Wdeprecated-declarations]
  • Loading branch information
Bambooin committed Aug 21, 2023
1 parent 0d12d90 commit 45adfd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rime/lever/customizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool Customizer::UpdateConfigFile() {
if (redistribute || (is_dirty && !missing_original_copy)) {
try {
fs::copy_file(source_path_, dest_path_,
fs::copy_option::overwrite_if_exists);
fs::copy_options::overwrite_existing);
} catch (...) {
LOG(ERROR) << "Error copying config file '" << source_path_.string()
<< "' to user directory.";
Expand Down
2 changes: 1 addition & 1 deletion src/rime/lever/deployment_tasks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ bool BackupConfigFiles::Run(Deployer* deployer) {
continue;
}
boost::system::error_code ec;
fs::copy_file(entry, backup, fs::copy_option::overwrite_if_exists, ec);
fs::copy_file(entry, backup, fs::copy_options::overwrite_existing, ec);
if (ec) {
LOG(ERROR) << "error backing up file " << backup.string();
++failure;
Expand Down

0 comments on commit 45adfd9

Please sign in to comment.