Skip to content

Commit 04fbdcf

Browse files
Merge pull request #1126 from SilinMykola/1124-fix-bug-in-MagentoBasePathUtil
1124: Fixed PatternSyntaxException: MagentoBasePathUtil.isMagentoFolderValid:35 for Windows styled dir path separator
2 parents 5ed7e07 + 9688606 commit 04fbdcf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 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)
35+
Package.frameworkRootComposer.split(Package.V_FILE_SEPARATOR)
3636
) != null
3737
|| VfsUtil.findRelativeFile(
3838
file,
39-
Package.frameworkRootGit.split(File.separator)) != null;
39+
Package.frameworkRootGit.split(Package.V_FILE_SEPARATOR)) != null;
4040
}
41+
4142
return false;
4243
}
4344

0 commit comments

Comments
 (0)