~verterok/bzr-eclipse/dev

« back to all changes in this revision

Viewing changes to org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/repository/BranchFactory.java

  • Committer: Guillermo Gonzalez
  • Date: 2008-11-08 14:12:28 UTC
  • Revision ID: guillo.gonzo@gmail.com-20081108141228-v1kovjjc1gerqbf3
 * add BranchFactoryTest for Bug #294061
 * minor improvements in the core test suite

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                if (uri != null) {
42
42
                        if(uri.getScheme() == null) {
43
43
                                // asume it's a raw path
44
 
                                File file = new File(uri.toString());
 
44
                                File file = new File(uri.getSchemeSpecificPart());
45
45
                                if(file.exists() || file.getParentFile().exists()) {                            
46
46
                                        return new LocalBranch(uri);
47
47
                                }
119
119
                                // this is a malformed uri or a local file
120
120
                                // now we try to check if this is a valid folder location
121
121
                                File file = new File(uri);
122
 
                                if(file.canRead()) {
 
122
                                if(file.exists()) {
123
123
                                        return true;
124
124
                                }
125
125
                                return false;