aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader/rar_downloader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/downloader/rar_downloader.rs')
-rw-r--r--crates/shirabe/src/downloader/rar_downloader.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/shirabe/src/downloader/rar_downloader.rs b/crates/shirabe/src/downloader/rar_downloader.rs
index 51feadb..afc2f12 100644
--- a/crates/shirabe/src/downloader/rar_downloader.rs
+++ b/crates/shirabe/src/downloader/rar_downloader.rs
@@ -28,12 +28,12 @@ pub struct RarDownloader {
impl RarDownloader {
pub fn new(
io: Box<dyn IOInterface>,
- config: Config,
- http_downloader: HttpDownloader,
+ config: std::rc::Rc<std::cell::RefCell<Config>>,
+ http_downloader: std::rc::Rc<std::cell::RefCell<HttpDownloader>>,
event_dispatcher: Option<EventDispatcher>,
cache: Option<Cache>,
- filesystem: Filesystem,
- process: ProcessExecutor,
+ filesystem: std::rc::Rc<std::cell::RefCell<Filesystem>>,
+ process: std::rc::Rc<std::cell::RefCell<ProcessExecutor>>,
) -> Self {
Self {
inner: FileDownloader::new(
@@ -67,7 +67,7 @@ impl RarDownloader {
];
let mut process_output = PhpMixed::Null;
- if self.inner.process.execute(
+ if self.inner.process.borrow_mut().execute(
PhpMixed::List(
command
.iter()
@@ -84,7 +84,7 @@ impl RarDownloader {
process_error = Some(format!(
"Failed to execute {}\n\n{}",
implode(" ", &command),
- self.inner.process.get_error_output(),
+ self.inner.process.borrow().get_error_output(),
));
}