We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbbf990 commit 7f3ccd7Copy full SHA for 7f3ccd7
src/store/mem.rs
@@ -745,6 +745,15 @@ async fn export_path_impl(
745
tx: &mut mpsc::Sender<ExportProgressItem>,
746
) -> io::Result<()> {
747
let ExportPathRequest { target, .. } = cmd;
748
+ if !target.is_absolute() {
749
+ return Err(io::Error::new(
750
+ io::ErrorKind::InvalidInput,
751
+ "path is not absolute",
752
+ ));
753
+ }
754
+ if let Some(parent) = target.parent() {
755
+ std::fs::create_dir_all(parent)?;
756
757
// todo: for partial entries make sure to only write the part that is actually present
758
let mut file = std::fs::File::create(target)?;
759
let size = entry.0.state.borrow().size();
0 commit comments