Skip to content

Commit 0936c4c

Browse files
committed
Fix trap extension for source files without extensions
We were writing files with names like `Gemfile..trap.gz`. Now fixed to `Gemfile.trap.gz`.
1 parent 4bfbf62 commit 0936c4c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extractor/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ impl TrapCompression {
4040

4141
fn extension(&self) -> &str {
4242
match self {
43-
TrapCompression::None => ".trap",
44-
TrapCompression::Gzip => ".trap.gz",
43+
TrapCompression::None => "trap",
44+
TrapCompression::Gzip => "trap.gz",
4545
}
4646
}
4747
}
@@ -269,6 +269,7 @@ fn path_for(dir: &Path, path: &Path, ext: &str) -> PathBuf {
269269
}
270270
if let Some(x) = result.extension() {
271271
let mut new_ext = x.to_os_string();
272+
new_ext.push(".");
272273
new_ext.push(ext);
273274
result.set_extension(new_ext);
274275
} else {

0 commit comments

Comments
 (0)