aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2020-09-11 23:57:53 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2020-09-11 23:57:53 +0000
commit54dde66a43fec87e8ee4da51beaaa62aabb53fb3 (patch)
tree14017b003041e2faf16e8bd406e1e32046bb07aa /src
parentMerge pull request #370 from komi1230/master (diff)
downloadminiserve-54dde66a43fec87e8ee4da51beaaa62aabb53fb3.tar.gz
miniserve-54dde66a43fec87e8ee4da51beaaa62aabb53fb3.zip
Upgrade to actix-web 3.0.0
Diffstat (limited to '')
-rw-r--r--src/archive.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/archive.rs b/src/archive.rs
index 9d156a8..a3e043d 100644
--- a/src/archive.rs
+++ b/src/archive.rs
@@ -256,9 +256,9 @@ where
f.read_to_end(&mut buffer).map_err(|e| {
ContextualError::IOError("Could not read from file".to_string(), e)
})?;
- let relative_path = zip_directory.join(current_entry_name);
+ let relative_path = zip_directory.join(current_entry_name).into_os_string();
zip_writer
- .start_file_from_path(Path::new(&relative_path), options)
+ .start_file(relative_path.to_string_lossy(), options)
.map_err(|_| {
ContextualError::CustomError("Could not add file path to ZIP".to_string())
})?;
@@ -267,9 +267,9 @@ where
})?;
buffer.clear();
} else if entry_metadata.is_dir() {
- let relative_path = zip_directory.join(current_entry_name);
+ let relative_path = zip_directory.join(current_entry_name).into_os_string();
zip_writer
- .add_directory_from_path(Path::new(&relative_path), options)
+ .add_directory(relative_path.to_string_lossy(), options)
.map_err(|_| {
ContextualError::CustomError(
"Could not add directory path to ZIP".to_string(),