aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2016-06-18 20:37:46 +0200
committerclsr <clsr@clsr.net>2016-06-18 20:37:46 +0200
commit0861d561839407ce63ccc56317ea74e52c457381 (patch)
tree0ee174ecca2a1d56c6051fac81c24a84cf5bf43d
parent92784c2d68acbe65ee6289fb99d345f117bd888e (diff)
downloadgomf-0861d561839407ce63ccc56317ea74e52c457381.tar.gz
gomf-0861d561839407ce63ccc56317ea74e52c457381.zip
Reduce the length of padding in Storage.idToFolderv0.2.4
-rw-r--r--USAGE2
-rw-r--r--storage.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/USAGE b/USAGE
index 3fea3fa..bd48ed8 100644
--- a/USAGE
+++ b/USAGE
@@ -54,7 +54,7 @@ Running
example: --name Example
--id-charset CHARSET
- sets the charset for file IDs in URLs to CHARSET; should only include URL-safe characters and no slashes
+ sets the charset for file IDs in URLs to CHARSET; should only include URL-safe characters and no slashes or underscores
example: --id-charset 0123456789
--id-length LENGTH
diff --git a/storage.go b/storage.go
index 7c674fc..f33dc34 100644
--- a/storage.go
+++ b/storage.go
@@ -153,7 +153,7 @@ func (s *Storage) randomId() string {
}
func (s *Storage) idToFolder(subfolder, id string) string {
- for len(id) < 4 {
+ for len(id) < 3 {
id = "_" + id
}
return path.Join(s.Folder, subfolder, id[0:1], id[1:3], id)