Skip to content

Commit 6441a3e

Browse files
authored
Merge pull request #1062 from bohdan-harniuk/1058-fix-file-separator-for-windows
1058: Fixed bug with the file separator on windows
2 parents d1a0cff + 7072744 commit 6441a3e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/com/magento/idea/magento2plugin/util/magento/MagentoBasePathUtil.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.intellij.openapi.vfs.VfsUtil;
1111
import com.intellij.openapi.vfs.VirtualFile;
1212
import com.magento.idea.magento2plugin.magento.packages.Package;
13-
import java.io.File;
1413
import java.util.Arrays;
1514
import org.jetbrains.annotations.NotNull;
1615

@@ -29,15 +28,17 @@ public static boolean isMagentoFolderValid(final String path) {
2928
return false;
3029
}
3130
final VirtualFile file = LocalFileSystem.getInstance().findFileByPath(path);
31+
3232
if (file != null && file.isDirectory()) {
3333
return VfsUtil.findRelativeFile(
3434
file,
35-
Package.frameworkRootComposer.split(File.separator)
36-
) != null
37-
|| VfsUtil.findRelativeFile(
38-
file,
39-
Package.frameworkRootGit.split(File.separator)) != null;
35+
Package.frameworkRootComposer.split(Package.V_FILE_SEPARATOR)
36+
) != null || VfsUtil.findRelativeFile(
37+
file,
38+
Package.frameworkRootGit.split(Package.V_FILE_SEPARATOR)
39+
) != null;
4040
}
41+
4142
return false;
4243
}
4344

0 commit comments

Comments
 (0)