History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-538
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Arjohn Kampman
Reporter: Jon
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

Exception when specified dir is actually a file

Created: 31/Mar/08 03:56 AM   Updated: 08/May/08 11:27 AM
Component/s: Console
Affects Version/s: 2.0, 2.0.1
Fix Version/s: 2.1

Environment: linux


 Description   
I think this is a bug in Console.java...

------------------
$ touch /tmp/is-a-file
$ mkdir /tmp/is-a-dir
$ start-console.sh

> connect /tmp/is-a-dir.
Disconnecting from default data directory
Connected to /tmp/is-a-dir

> connect /tmp/not-existing.
ERROR: Specified path is not an (existing) directory: /tmp/not-existing

> connect /tmp/is-a-file.
ERROR: Failed to initialize data file /tmp/is-a-file/repositories/SYSTEM/memorystore.data
31-Mar-2008 02:53:49 org.openrdf.console.Console installNewManager
SEVERE: Failed to install new manager
org.openrdf.repository.RepositoryException: Failed to initialize data file /tmp/is-a-file/repositories/SYSTEM/memorystore.data
        at org.openrdf.repository.sail.SailRepository.initialize(SailRepository.java:85)
        at org.openrdf.repository.base.RepositoryWrapper.initialize(RepositoryWrapper.java:60)
        at org.openrdf.repository.event.base.NotifyingRepositoryWrapper.initialize(NotifyingRepositoryWrapper.java:130)
        at org.openrdf.repository.manager.SystemRepository.initialize(SystemRepository.java:70)
...etc

----------------
502 : akam 3695 private boolean connectLocal(String path) {
503 : akam 3197 File dir = new File(path);
504 : if (!dir.exists() && !dir.isDirectory()) {
505 : writeError("Specified path is not an (existing) directory: " + path);
506 : return false;
507 : }
508 :
509 : return installNewManager(new LocalRepositoryManager(dir), dir.toString());
510 : jeen 2729 }

It looks like the && above should be || ?
Thanks, Jon

 All   Comments   Change History      Sort Order:
Comment by Arjohn Kampman [31/Mar/08 10:48 AM]
The && should indeed be a ||.