osutil: add CAMLI_VAR_DIR for CamliVarDir

Change-Id: Idcb0a32ccc49cf24e61bdb81a4fdb1a0f049595c
This commit is contained in:
Brad Fitzpatrick 2014-02-23 10:18:15 -08:00
parent f318ad4410
commit 09266d5960
2 changed files with 7 additions and 1 deletions

View File

@ -132,6 +132,10 @@ CAMLI_DISABLE_THUMB_CACHE (bool):
If true, no thumbnail caching is done, and URLs even have cache
buster components, to force browsers to reload a lot.
CAMLI_VAR_DIR (string):
Path used by pkg/osutil to override operating system specific application
storage directory. Generally unused.
DEV_THROTTLE_KBPS (integer):
DEV_THROTTLE_LATENCY_MS (integer):
Rate limit and/or inject latency in pkg/webserver responses. A value of 0

View File

@ -87,6 +87,9 @@ func makeCacheDir() {
}
func CamliVarDir() string {
if d := os.Getenv("CAMLI_VAR_DIR"); d != "" {
return d
}
failInTests()
switch runtime.GOOS {
case "windows":
@ -98,7 +101,6 @@ func CamliVarDir() string {
}
func CamliBlobRoot() string {
failInTests()
return filepath.Join(CamliVarDir(), "blobs")
}