[fix] 修复mac下面路径过长导致拷贝文件失败 (#37)

main
firleaves 2023-09-28 19:37:46 +08:00 committed by GitHub
parent b024a18ba1
commit cc09487671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -90,12 +90,16 @@ namespace HybridCLR.Editor.Installer
private static void CopyWithCheckLongFile(string srcFile, string dstFile)
{
if (srcFile.Length > 255)
var maxPathLength = 255;
#if UNITY_EDITOR_OSX
maxPathLength = 1024;
#endif
if (srcFile.Length > maxPathLength)
{
UnityEngine.Debug.LogError($"srcFile:{srcFile} path is too long. copy ignore!");
return;
}
if (dstFile.Length > 255)
if (dstFile.Length > maxPathLength)
{
UnityEngine.Debug.LogError($"dstFile:{dstFile} path is too long. copy ignore!");
return;