|
@@ -253,7 +253,7 @@ namespace GFGEditor
|
|
|
}
|
|
|
|
|
|
//清除无资源的Md5数据
|
|
|
- public static void DeleteUnnecessaryImageMD5(string[] saveNames)
|
|
|
+ private static void DeleteUnnecessaryImageMD5(string[] saveNames)
|
|
|
{
|
|
|
for (int j = 0; j < saveNames.Length; j++)
|
|
|
{
|
|
@@ -276,7 +276,7 @@ namespace GFGEditor
|
|
|
ImagesClip.WriteSourceImagesMD5(sourceResMD5, saveName);
|
|
|
}
|
|
|
}
|
|
|
- public static void DeleteUnnecessaryImageRes(string targetPath, string[] saveNames)
|
|
|
+ private static void DeleteUnnecessaryImageRes(string targetPath, string[] saveNames)
|
|
|
{
|
|
|
string[] includeExtensionNames = new string[] { ".png", ".jpg" };
|
|
|
if (!Directory.Exists(targetPath))
|
|
@@ -318,12 +318,19 @@ namespace GFGEditor
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- if (!has) File.Delete(targetPath + fileName);
|
|
|
+ if (!has)
|
|
|
+ {
|
|
|
+ var deleteFile = targetPath + fileName;
|
|
|
+ File.Delete(targetPath + fileName);
|
|
|
+
|
|
|
+ //写入删除文件脚本
|
|
|
+ DeleteFileHelper.AddFile(deleteFile);
|
|
|
+ }
|
|
|
}
|
|
|
Debug.Log(targetPath + "清除完成!");
|
|
|
}
|
|
|
//清除冗余位置文件
|
|
|
- public static void DeleteUnnecessaryImagePos(string targetPath)
|
|
|
+ private static void DeleteUnnecessaryImagePos(string targetPath)
|
|
|
{
|
|
|
string[] includeExtensionNames = new string[] { ".png", ".jpg" };
|
|
|
var files = Directory.GetFiles(targetPath);
|
|
@@ -339,8 +346,11 @@ namespace GFGEditor
|
|
|
string targetFilePath = targetPath + fileName;
|
|
|
if (extensionName == ".bytes" && !File.Exists(targetFilePath + includeExtensionNames[0]) && !File.Exists(targetFilePath + includeExtensionNames[1]))
|
|
|
{
|
|
|
- File.Delete(targetPath + Path.GetFileName(file));
|
|
|
+ var deleteFile = targetPath + Path.GetFileName(file);
|
|
|
+ File.Delete(deleteFile);
|
|
|
|
|
|
+ //写入删除文件脚本
|
|
|
+ DeleteFileHelper.AddFile(deleteFile);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -371,6 +381,8 @@ namespace GFGEditor
|
|
|
if (!existFile)
|
|
|
{
|
|
|
File.Delete(lfile);
|
|
|
+ //写入删除文件脚本
|
|
|
+ DeleteFileHelper.AddFile(lfile);
|
|
|
}
|
|
|
}
|
|
|
foreach (var lDir in localDirs)
|