chore(ci): disable long file names in GetInterestingTempDirectoryName() when ENABLE_LONG_FILENAMES=false (#2295)

This commit is contained in:
Jarek Kowalski authored and GitHub committed 2022-08-09 06:55:30 +00:00
1 parent 51dcaa985d
commit 4d55f91070
1 file changed
+4 -1
+4 -1
View File
@@ -34,7 +34,10 @@ func GetInterestingTempDirectoryName() (string, error) {
// make sure the base directory is quite long to trigger very long filenames on Windows.
if n := len(td); n < targetLen {
td = filepath.Join(td, strings.Repeat("f", targetLen-n))
if !ShouldSkipLongFilenames() {
td = filepath.Join(td, strings.Repeat("f", targetLen-n))
}
//nolint:gomnd
if err := os.MkdirAll(td, 0o700); err != nil {
return "", errors.Wrap(err, "unable to create temp directory")