Skip to content

Commit 01b2fda

Browse files
Merge pull request #31 from AlexMeesters/master
Fixed error for windows, where it was not able to find any folders
2 parents 63d0bf8 + 2fd2b54 commit 01b2fda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Editor/GenerateFileEditorWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ private void Generate () {
299299
private string FindDirectoryWithName (string directory, string name) {
300300
var _directories = this.WalkDirectory (directory);
301301
foreach (var _directory in _directories)
302-
if (_directory.Split ('/').Last ().ToLower () == name.ToLower ())
302+
if (Path.GetFileName(_directory)?.ToLower () == name.ToLower ())
303303
return _directory;
304304
Debug.LogWarning ("There is no directory named '" + name + "', creating in project root.");
305305
return directory;

0 commit comments

Comments
 (0)