Skip to content

Commit fd7b4e8

Browse files
authored
Merge pull request #16 from CandyCoded/hotfix/only-create-dir-if-required
[hotfix] Only created resources dir if env file exists.
2 parents 8ec345b + 87e1d10 commit fd7b4e8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Editor/Scripts/BuildTools.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ public void OnPreprocessBuild(BuildReport report)
3535

3636
}
3737

38-
if (!Directory.Exists(env.resourcesDirPath))
38+
if (File.Exists(env.editorFilePath))
3939
{
4040

41-
Directory.CreateDirectory(env.resourcesDirPath);
41+
if (!Directory.Exists(env.resourcesDirPath))
42+
{
4243

43-
_resourcesDirCreated = true;
44+
Directory.CreateDirectory(env.resourcesDirPath);
4445

45-
}
46+
_resourcesDirCreated = true;
4647

47-
if (File.Exists(env.editorFilePath))
48-
{
48+
}
4949

5050
FileUtil.CopyFileOrDirectory(env.editorFilePath, env.runtimeFilePath);
5151

0 commit comments

Comments
 (0)