mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 23:23:50 +03:00
fix: replace deprecated functions
Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
parent
ba9fc92229
commit
70b87d331f
@ -102,7 +102,7 @@ impl ZipFile {
|
||||
// Write file or directory
|
||||
if path.is_file() {
|
||||
tracing::info!("Adding file {:?} as {:?}", path, name);
|
||||
zip.start_file_from_path(name, options)?;
|
||||
zip.start_file(name.to_string_lossy(), options)?;
|
||||
let mut f = File::open(path)?;
|
||||
|
||||
f.read_to_end(&mut buffer)?;
|
||||
@ -112,7 +112,7 @@ impl ZipFile {
|
||||
// Only if not root Avoids path spec / warning
|
||||
// and mapname conversion failed error on unzip
|
||||
tracing::info!("Adding directory {:?} as {:?}", path, name);
|
||||
zip.add_directory_from_path(name, options)?;
|
||||
zip.add_directory(name.to_string_lossy(), options)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user