Dolda2000 GitWeb
/
jsvc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a VM shutdown hook in DirServer to shut down contexts properly.
[jsvc.git]
/
src
/
dolda
/
jsvc
/
store
/
FileStore.java
diff --git
a/src/dolda/jsvc/store/FileStore.java
b/src/dolda/jsvc/store/FileStore.java
index
17a8f88
..
31abd5e
100644
(file)
--- a/
src/dolda/jsvc/store/FileStore.java
+++ b/
src/dolda/jsvc/store/FileStore.java
@@
-38,8
+38,10
@@
class FileStore extends Store {
this.base = new java.io.File(base, nm.substring(p));
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
this.base = new java.io.File(base, nm.substring(p));
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
- if(!FileStore.this.base.mkdirs())
- throw(new RuntimeException("Could not create store directory (Java won't tell me why)"));
+ if(!FileStore.this.base.exists()) {
+ if(!FileStore.this.base.mkdirs())
+ throw(new RuntimeException("Could not create store directory (Java won't tell me why)"));
+ }
return(null);
}
});
return(null);
}
});
@@
-236,13
+238,7
@@
class FileStore extends Store {
public static void register() {
Store.register("file", new Factory() {
public Store create(String rootname, Package pkg) {
public static void register() {
Store.register("file", new Factory() {
public Store create(String rootname, Package pkg) {
- java.io.File root = new java.io.File(rootname);
- ThreadContext ctx = ThreadContext.current();
- if(ctx != null) {
- if(ctx.server().name() != null)
- root = new java.io.File(root, ctx.server().name());
- }
- return(new FileStore(pkg, root));
+ return(new FileStore(pkg, new java.io.File(rootname)));
}
});
}
}
});
}