Prechádzať zdrojové kódy

fucked by chatgpt, rename doent work between partitions

Thomas 7 mesiacov pred
rodič
commit
8969222959
1 zmenil súbory, kde vykonal 2 pridanie a 3 odobranie
  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(())
     }