Skip to content

Commit 50b008a

Browse files
compiletest: Canonicalize paths when remove incr.comp. dir, enabling longer paths
1 parent 68d2275 commit 50b008a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tools/compiletest/src/runtest.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1976,7 +1976,10 @@ actual:\n\
19761976
// runs.
19771977
let incremental_dir = self.incremental_dir();
19781978
if incremental_dir.exists() {
1979-
fs::remove_dir_all(&incremental_dir).unwrap();
1979+
// Canonicalizing the path will convert it to the //?/ format
1980+
// on Windows, which enables paths longer than 260 character
1981+
let canonicalized = incremental_dir.canonicalize().unwrap();
1982+
fs::remove_dir_all(canonicalized).unwrap();
19801983
}
19811984
fs::create_dir_all(&incremental_dir).unwrap();
19821985

0 commit comments

Comments
 (0)