Skip to content

Commit 143256e

Browse files
committed
Fix filenames in source archives
1 parent c183e05 commit 143256e

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

extractor/src/main.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,17 @@ fn path_for(dir: &Path, path: &Path, ext: &str) -> PathBuf {
267267
}
268268
}
269269
}
270-
match result.extension() {
271-
Some(x) => {
272-
let mut new_ext = x.to_os_string();
273-
new_ext.push(".");
274-
new_ext.push(ext);
275-
result.set_extension(new_ext);
276-
}
277-
None => {
278-
result.set_extension(ext);
270+
if !ext.is_empty() {
271+
match result.extension() {
272+
Some(x) => {
273+
let mut new_ext = x.to_os_string();
274+
new_ext.push(".");
275+
new_ext.push(ext);
276+
result.set_extension(new_ext);
277+
}
278+
None => {
279+
result.set_extension(ext);
280+
}
279281
}
280282
}
281283
result

0 commit comments

Comments
 (0)