Skip to content

Commit 46cb95c

Browse files
committed
revert dots
1 parent 439055a commit 46cb95c

File tree

1 file changed

+4
-4
lines changed
  • dash-spv/src/storage

1 file changed

+4
-4
lines changed

dash-spv/src/storage/io.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn get_temp_path(path: &Path) -> PathBuf {
1515
let file_name = path.file_name().and_then(|n| n.to_str()).unwrap_or("temp");
1616
let unique_id = COUNTER.fetch_add(1, Ordering::Relaxed);
1717
let pid = std::process::id();
18-
temp_path.set_file_name(format!("tmp_{}_{}_{}_.tmp", file_name, pid, unique_id));
18+
temp_path.set_file_name(format!(".{}.{}.{}.tmp", file_name, pid, unique_id));
1919
temp_path
2020
}
2121

@@ -74,10 +74,10 @@ mod tests {
7474
// Check temp file is in same directory as original
7575
assert_eq!(temp1.parent(), path.parent());
7676

77-
// Check temp file name starts with tmp_ and ends with .tmp
77+
// Check temp file name starts with dot and ends with .tmp
7878
let file_name = temp1.file_name().unwrap().to_string_lossy();
79-
assert!(file_name.starts_with("tmp_file.dat_"));
80-
assert!(file_name.ends_with("_.tmp"));
79+
assert!(file_name.starts_with(".file.dat."));
80+
assert!(file_name.ends_with(".tmp"));
8181
}
8282

8383
#[tokio::test]

0 commit comments

Comments
 (0)