IDEA-74497 When reading branches from the file system, convert to "/"

This commit is contained in:
Kirill Likhodedov
2011-09-19 21:19:58 +04:00
parent 39346459e9
commit 876719ed90
@@ -232,7 +232,10 @@ class GitRepositoryReader {
@Override
public boolean process(File file) {
if (!file.isDirectory()) {
branches.put(FileUtil.getRelativePath(myRefsHeadsDir, file), file);
String relativePath = FileUtil.getRelativePath(myRefsHeadsDir, file);
if (relativePath != null) {
branches.put(FileUtil.toSystemIndependentName(relativePath), file);
}
}
return true;
}
@@ -298,7 +301,9 @@ class GitRepositoryReader {
public boolean process(File file) {
if (!file.isDirectory()) {
final String relativePath = FileUtil.getRelativePath(myRefsRemotesDir, file);
branches.add(new GitBranch(relativePath, false, true));
if (relativePath != null) {
branches.add(new GitBranch(FileUtil.toSystemIndependentName(relativePath), false, true));
}
}
return true;
}