We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e50fb8 commit cadbb52Copy full SHA for cadbb52
src/lib.rs
@@ -1037,9 +1037,10 @@ impl Build {
1037
1038
let mut objects = Vec::new();
1039
for file in self.files.iter() {
1040
- let obj = if file.has_root() {
1041
- // If `file` is an absolute path, prefix the `basename`
1042
- // with the `dirname`'s hash to ensure name uniqueness.
+ let obj = if file.has_root() || file.components().any(|x| x == Component::ParentDir) {
+ // If `file` is an absolute path or might not be usable directly as a suffix due to
+ // using "..", use the `basename` prefixed with the `dirname`'s hash to ensure name
1043
+ // uniqueness.
1044
let basename = file
1045
.file_name()
1046
.ok_or_else(|| Error::new(ErrorKind::InvalidArgument, "file_name() failure"))?
0 commit comments