Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkt That Network Specific Plugin Path Doesn't Exist #249

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion coffee_core/src/coffee.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//! Coffee mod implementation
use std::collections::HashMap;
use std::fmt::Debug;
use std::vec::Vec;

Check warning on line 4 in coffee_core/src/coffee.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

the item `Vec` is imported redundantly

Check warning on line 4 in coffee_core/src/coffee.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

the item `Vec` is imported redundantly
use tokio::fs;

use async_trait::async_trait;
use clightningrpc_common::client::Client;
use clightningrpc_common::json_utils;
use clightningrpc_conf::{CLNConf, SyncCLNConf};
use log;

Check warning on line 11 in coffee_core/src/coffee.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

the item `log` is imported redundantly

Check warning on line 11 in coffee_core/src/coffee.rs

View workflow job for this annotation

GitHub Actions / Build (nightly)

the item `log` is imported redundantly
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use serde_json::json;
Expand Down Expand Up @@ -270,7 +270,15 @@
old_root_path,
new_root_path
);
let script = format!("cp -r -T {old_root_path} {new_root_path}");

if fs::try_exists(new_root_path.clone()).await? {
log::debug!(
"A folder {} already exists. We should never reach this point",
new_root_path.clone()
);
fs::remove_dir_all(new_root_path.clone()).await?;
}
let script = format!("cp -r {old_root_path} {new_root_path}");
sh!(self.config.root_path.clone(), script, verbose);
log::debug!(
"Done! copying directory from {} inside the new one {}",
Expand Down
Loading