Explorar o código

fucked by chatgpt, rename doent work between partitions

Thomas hai 7 meses
pai
achega
8969222959
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  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(())
     }