Skip to content

Commit 90a5d67

Browse files
committed
revert dots
1 parent eeedee4 commit 90a5d67

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • dash-spv/src/storage

dash-spv/src/storage/io.rs

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

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

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

8484
#[tokio::test]

0 commit comments

Comments
 (0)