fixed django project template folder selection (PY-1715)
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Wed, 8 Sep 2010 16:44:13 +0000 (20:44 +0400)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Wed, 8 Sep 2010 18:04:03 +0000 (22:04 +0400)
platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java

index 81e09dfb778087edb88ab45ed4d26bc06c389d81..4ef07b08aa241e446c258a46c37a4afc78939d8a 100644 (file)
@@ -226,7 +226,7 @@ public class ComponentWithBrowseButton<Comp extends JComponent> extends JPanel i
       while (path == null && directoryName.length() > 0) {
         int pos = directoryName.lastIndexOf('/');
         if (pos <= 0) break;
-        directoryName = directoryName.substring(0, pos-1);
+        directoryName = directoryName.substring(0, pos);
         path = LocalFileSystem.getInstance().findFileByPath(directoryName);
       }
       return path;