Skip to content

Commit ab41198

Browse files
committed
Avoid very long core archive names
Fixes #284
1 parent 29cf4c8 commit ab41198

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: builder_utils/utils.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -558,5 +558,10 @@ func GetCachedCoreArchiveFileName(fqbn, coreFolder string) string {
558558
coreFolder = absCoreFolder
559559
} // silently continue if absolute path can't be detected
560560
hash := utils.MD5Sum([]byte(coreFolder))
561-
return "core_" + fqbnToUnderscore + "_" + hash + ".a"
561+
realName := "core_" + fqbnToUnderscore + "_" + hash + ".a"
562+
if len(realName) > 100 {
563+
// avoid really long names, simply hash the final part
564+
realName = "core_" + utils.MD5Sum([]byte(fqbnToUnderscore+"_"+hash)) + ".a"
565+
}
566+
return realName
562567
}

0 commit comments

Comments
 (0)