Skip to content

Commit e5e1dda

Browse files
committed
[O] Should Create LocalAssets if not exist
1 parent 077a8e1 commit e5e1dda

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

AquaMai.Mods/Enhancement/ServerResources.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ private static IEnumerator GetFileImpl()
156156
// yield break;
157157
}
158158

159+
// 没有文件夹就新建
160+
if (!Directory.Exists(Path.GetDirectoryName(cacheFile)))
161+
{
162+
Directory.CreateDirectory(Path.GetDirectoryName(cacheFile));
163+
}
159164
File.WriteAllBytes(cacheFile, bytes);
160165
LoadFile();
161166
}

0 commit comments

Comments
 (0)