diff --git a/csp_test.go b/csp_test.go index e3dbbdd..b996594 100644 --- a/csp_test.go +++ b/csp_test.go @@ -20,6 +20,7 @@ func TestContentSecurityPolicy(t *testing.T) { Config.siteURL = "http://linx.example.org/" Config.filesDir = path.Join(os.TempDir(), generateBarename()) Config.metaDir = Config.filesDir + "_meta" + Config.locksDir = Config.filesDir + "_locks" Config.maxSize = 1024 * 1024 * 1024 Config.noLogs = true Config.siteName = "linx" diff --git a/linx-cleanup/linx-cleanup.go b/linx-cleanup/linx-cleanup.go index 7953ab4..08d8363 100644 --- a/linx-cleanup/linx-cleanup.go +++ b/linx-cleanup/linx-cleanup.go @@ -16,11 +16,11 @@ func main() { "path to files directory") flag.StringVar(&metaDir, "metapath", "meta/", "path to metadata directory") - flag.StringVar(&metaDir, "lockspath", "locks/", - "path to metadata directory") + flag.StringVar(&locksDir, "lockspath", "locks/", + "path to locks directory") flag.BoolVar(&noLogs, "nologs", false, "don't log deleted files") flag.Parse() - cleanup.Cleanup(filesDir, metaDir, noLogs) + cleanup.Cleanup(filesDir, metaDir, locksDir, noLogs) } diff --git a/server.go b/server.go index f6a45a9..ec66f75 100644 --- a/server.go +++ b/server.go @@ -256,7 +256,7 @@ func main() { flag.StringVar(&Config.metaDir, "metapath", "meta/", "path to metadata directory") flag.StringVar(&Config.locksDir, "lockspath", "locks/", - "path to metadata directory") + "path to locks directory") flag.BoolVar(&Config.basicAuth, "basicauth", false, "allow logging by basic auth password") flag.BoolVar(&Config.noLogs, "nologs", false, diff --git a/server_test.go b/server_test.go index fc225ce..c64cfdc 100644 --- a/server_test.go +++ b/server_test.go @@ -33,6 +33,7 @@ func TestSetup(t *testing.T) { Config.siteURL = "http://linx.example.org/" Config.filesDir = path.Join(os.TempDir(), generateBarename()) Config.metaDir = Config.filesDir + "_meta" + Config.locksDir = Config.filesDir + "_locks" Config.maxSize = 1024 * 1024 * 1024 Config.noLogs = true Config.siteName = "linx" @@ -1255,6 +1256,7 @@ func TestInferSiteURLHTTPSFastCGI(t *testing.T) { func TestShutdown(t *testing.T) { os.RemoveAll(Config.filesDir) os.RemoveAll(Config.metaDir) + os.RemoveAll(Config.locksDir) } func TestPutAndGetCLI(t *testing.T) {