Răsfoiți Sursa

fucked by chatgpt, rename doent work between partitions

Thomas 7 luni în urmă
părinte
comite
8969222959
1 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 3
      src/collection/flowcells.rs

+ 2 - 3
src/collection/flowcells.rs

@@ -188,9 +188,8 @@ impl FlowCells {
             .with_context(|| format!("Failed to write FlowCells to: {archive_path}"))?;
         file.flush()?;
         // file.get_ref().sync_all()?;
-        std::fs::rename(&tmp_path, archive_path)?;
-
-
+        std::fs::copy(&tmp_path, archive_path)?;
+        std::fs::remove_file(tmp_path)?;
 
         Ok(())
     }