Permalink
Browse files

Merge pull request #83 from bsquared/master

Resubmitted fix for issue 81.
  • Loading branch information...
2 parents 04333b2 + a24d56b commit 933092fe40a6171426f6e23b29af8b5909a967b0 Chris Anderson committed Mar 1, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 TouchDB-Android/src/com/couchbase/touchdb/TDServer.java
@@ -39,7 +39,7 @@
private static final ObjectMapper mapper = new ObjectMapper();
- public static final String LEGAL_CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789_$()+-/";
+ public static final String LEGAL_CHARACTERS = "[^a-z]{1,}[^a-z0-9_$()/+-]*$";
public static final String DATABASE_SUFFIX = ".touchdb";
private File directory;
@@ -65,7 +65,7 @@ public TDServer(String directoryName) throws IOException {
}
private String pathForName(String name) {
- if((name == null) || (name.length() == 0) || Pattern.matches("^" + LEGAL_CHARACTERS, name) || !Character.isLowerCase(name.charAt(0))) {
+ if((name == null) || (name.length() == 0) || Pattern.matches(LEGAL_CHARACTERS, name)) {
return null;
}
name = name.replace('/', ':');

0 comments on commit 933092f

Please sign in to comment.