mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-26 11:45:00 +03:00
Merge pull request #861 from AleoHQ/windows-zip-fix
[CLI] Fixes issue with `leo publish` on Windows
This commit is contained in:
commit
b6c5f4d60f
@ -106,7 +106,8 @@ impl ZipFile {
|
||||
// Write file or directory
|
||||
if path.is_file() {
|
||||
tracing::info!("Adding file {:?} as {:?}", path, name);
|
||||
zip.start_file(name.to_string_lossy(), options)?;
|
||||
#[allow(deprecated)]
|
||||
zip.start_file_from_path(name, options)?;
|
||||
let mut f = File::open(path)?;
|
||||
|
||||
f.read_to_end(&mut buffer)?;
|
||||
@ -116,7 +117,8 @@ 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(name.to_string_lossy(), options)?;
|
||||
#[allow(deprecated)]
|
||||
zip.add_directory_from_path(name, options)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user