Skip to content

Commit

Permalink
CleanEmptyDirectoresFeature fix to not occure on prefab creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadcows committed Apr 3, 2019
1 parent 730d2b3 commit e20bb0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tools/Features/CleanEmptyDirectoriesFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ private static bool MenuItemValidation()
public static string[] OnWillSaveAssets(string[] paths)
{
if (!IsEnabled) return paths;
// Prefab creation enforces SaveAsset and this may cause unwanted dir cleanup
if (paths.Length == 1 && paths[0].EndsWith(".prefab")) return paths;

List<DirectoryInfo> emptyDirectories = GetEmptyDirectories();
if (emptyDirectories == null) return paths;
Expand Down

0 comments on commit e20bb0b

Please sign in to comment.