【热更工具】提交热更文件到git时,如果目录不存在则创建
parent
a228c18c50
commit
1d49490fe3
|
|
@ -613,6 +613,12 @@ namespace GameEditor.FrameTool
|
||||||
foreach (ResourceFile rf in updateList)
|
foreach (ResourceFile rf in updateList)
|
||||||
{
|
{
|
||||||
EditorUtility.DisplayProgressBar("正在复制文件:" + toPath, rf.fileName, (float)i/updateList.Count);
|
EditorUtility.DisplayProgressBar("正在复制文件:" + toPath, rf.fileName, (float)i/updateList.Count);
|
||||||
|
string dirName = Path.GetDirectoryName(toPath + rf.fileName);
|
||||||
|
if (!Directory.Exists(dirName))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(dirName);
|
||||||
|
}
|
||||||
|
|
||||||
File.Copy(fromPath + rf.fileName, toPath + rf.fileName, true);
|
File.Copy(fromPath + rf.fileName, toPath + rf.fileName, true);
|
||||||
log.Add(rf.fileName);
|
log.Add(rf.fileName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue