Skip to content

Commit

Permalink
Update migrator.rs
Browse files Browse the repository at this point in the history
Signed-off-by: Kruemmelspalter <kruemmelspalter@duck.com>
  • Loading branch information
Kruemmelspalter authored Jan 30, 2024
1 parent a673c51 commit d52f34f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src-tauri/src/bin/migrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ async fn main() -> Result<()> {
_ => filespider::types::DocType::Plain,
}),
tags,
r.try_get("fileExtension").map(Some).unwrap_or(None),
r.try_get("fileExtension").map(S ome).unwrap_or(None),
File::None,
)
.await?;

let docdir = filespider::document::get_document_directory(&id)?;
let old_id = Uuid::try_parse(&r.get::<String, &str>("id"))?;
let ext =
if !Command::new("sh")
.arg("-c")
.arg(format!(
"cp -r {}/{}/* {} && mv {}/{} {}/{}",
args.document_directory, old_id, docdir, docdir, old_id, docdir, id
"mkdir {}/{} cp -r {}/{}/* {} && mv {}/{}{} {}/{}{}",
docdir, id, args.document_directory, old_id, docdir, docdir, old_id, ext, docdir, id, ext,
))
.spawn()?
.wait()
Expand Down

0 comments on commit d52f34f

Please sign in to comment.