瀏覽代碼

fucked by chatgpt, rename doent work between partitions

Thomas 7 月之前
父節點
當前提交
8969222959
共有 1 個文件被更改,包括 2 次插入3 次删除
  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}"))?;
             .with_context(|| format!("Failed to write FlowCells to: {archive_path}"))?;
         file.flush()?;
         file.flush()?;
         // file.get_ref().sync_all()?;
         // 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(())
         Ok(())
     }
     }