chore: Fix build
This commit is contained in:
parent
8a65ac764b
commit
fce8e8b7de
|
@ -334,7 +334,7 @@ pub fn connect<'gc>(
|
||||||
pub fn flush<'gc>(
|
pub fn flush<'gc>(
|
||||||
avm: &mut Avm1<'gc>,
|
avm: &mut Avm1<'gc>,
|
||||||
action_context: &mut UpdateContext<'_, 'gc, '_>,
|
action_context: &mut UpdateContext<'_, 'gc, '_>,
|
||||||
_this: Object<'gc>,
|
this: Object<'gc>,
|
||||||
_args: &[Value<'gc>],
|
_args: &[Value<'gc>],
|
||||||
) -> Result<ReturnValue<'gc>, Error> {
|
) -> Result<ReturnValue<'gc>, Error> {
|
||||||
let data = this
|
let data = this
|
||||||
|
@ -351,7 +351,8 @@ pub fn flush<'gc>(
|
||||||
|
|
||||||
Ok(action_context
|
Ok(action_context
|
||||||
.storage
|
.storage
|
||||||
.put_string(&name, data_json.dump()).into())
|
.put_string(&name, data_json.dump())
|
||||||
|
.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_size<'gc>(
|
pub fn get_size<'gc>(
|
||||||
|
|
|
@ -48,7 +48,6 @@ impl StorageBackend for DiskStorageBackend {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn put_string(&mut self, name: &str, value: String) -> bool {
|
fn put_string(&mut self, name: &str, value: String) -> bool {
|
||||||
let full_path = self.base_path.join(Path::new(name));
|
let full_path = self.base_path.join(Path::new(name));
|
||||||
|
|
||||||
|
@ -64,13 +63,12 @@ impl StorageBackend for DiskStorageBackend {
|
||||||
Err(r) => {
|
Err(r) => {
|
||||||
log::warn!("Unable to save file {:?}", r);
|
log::warn!("Unable to save file {:?}", r);
|
||||||
false
|
false
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remove_key(&mut self, name: &str) {
|
fn remove_key(&mut self, name: &str) {
|
||||||
let full_path = self.base_path.join(Path::new(name));
|
let full_path = self.base_path.join(Path::new(name));
|
||||||
|
let _ = fs::remove_file(full_path);
|
||||||
log::info!("[storage] Saved {} to {:?}", value, full_path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue