fix: keep a path's bytes, so a filename that is not utf-8 survives
This commit is contained in:
@@ -81,11 +81,7 @@ pub fn import(ctx: &Ctx, file: &Path) -> Result<()> {
|
||||
|
||||
// a directory cannot be streamed, so it is the one shape that gets copied in
|
||||
if matches!(dump, Dump::Directory) {
|
||||
when_ready(
|
||||
ctx,
|
||||
&db,
|
||||
&Cp::into_container(&file.to_string_lossy(), &db.container, &remote),
|
||||
)?;
|
||||
when_ready(ctx, &db, &Cp::into_container(file, &db.container, &remote))?;
|
||||
}
|
||||
|
||||
let kind = match &dump {
|
||||
@@ -284,7 +280,7 @@ fn dump_directory(ctx: &Ctx, db: &Database, target: &Path) -> Result<()> {
|
||||
.in_container(&db.container)
|
||||
.run(ctx)?;
|
||||
|
||||
let copied = Cp::out_of_container(&db.container, &remote, &target.to_string_lossy()).run(ctx);
|
||||
let copied = Cp::out_of_container(&db.container, &remote, target).run(ctx);
|
||||
|
||||
let _ = Rm::recursive(&remote).in_container(&db.container).run(ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user