Revert "Refactor: add subdirectory-after-writing-parent option"

This reverts commit c31d85930b.
This commit is contained in:
Chris Hennick 2023-05-14 18:55:12 -07:00
parent 70cf9514bb
commit e3b0da188b
No known key found for this signature in database
GPG key ID: 25653935CC8B6C74

View file

@ -13,9 +13,6 @@ pub enum BasicFileOperation {
options: zip_next::write::FileOptions,
},
WriteDirectory(zip_next::write::FileOptions),
WriteSubdirectory {
parent_dir: BasicFileOperation::WriteSubdirectory
},
WriteSymlinkWithTarget {
target: Box<PathBuf>,
options: zip_next::write::FileOptions,
@ -60,10 +57,6 @@ fn do_operation<T>(writer: &mut RefCell<zip_next::ZipWriter<T>>,
BasicFileOperation::WriteDirectory(options) => {
writer.borrow_mut().add_directory(name, options)?;
}
BasicFileOperation::WriteSubdirectory(parent_dir) => {
do_operation(writer, parent_dir)?;
writer.borrow_mut().add_directory(parent_dir.referenceable_name() + name, options)?;
}
BasicFileOperation::WriteSymlinkWithTarget {target, options} => {
writer.borrow_mut().add_symlink(name, target.to_string_lossy(), options)?;
}