aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/feed/cache.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/feed/cache.go b/internal/feed/cache.go
index 2d8f9aa..4453246 100644
--- a/internal/feed/cache.go
+++ b/internal/feed/cache.go
@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"os"
+ "path/filepath"
"time"
"github.com/nightlyone/lockfile"
@@ -51,12 +52,16 @@ func cacheForVersion(version Version) (CacheImpl, error) {
}
}
-func lockName(fileName string) string {
- return fileName + ".lck"
+func lockName(fileName string) (string, error) {
+ return filepath.Abs(fileName + ".lck")
}
func lock(fileName string) (lock lockfile.Lockfile, err error) {
- lockFile := lockName(fileName)
+ var lockFile string
+
+ if lockFile, err = lockName(fileName); err != nil {
+ return
+ }
log.Debugf("Handling lock file '%s'", lockFile)
if lock, err = lockfile.New(lockFile); err != nil {
14:22 +0100'>2013-03-20Makefile: remove CGIT-CFLAGS files in clean stageJason A. Donenfeld1-1/+1 2013-03-20ui-summary.c: Move urls variable into print_urls()Lukas Fleischer1-6/+14 2013-03-20Fix colspan valuesLukas Fleischer3-14/+28 2013-03-20html: check return value of writeJason A. Donenfeld1-2/+3 2013-03-20ui-shared: squelch compiler warning.Jason A. Donenfeld1-0/+1 2013-03-20cgit.mk: Use SHELL_PATH_SQ to run gen-version.shJohn Keeping1-1/+1 2013-03-20cgit.mk: don't rebuild everything if CGIT_VERSION changesJohn Keeping1-1/+8 2013-03-20ui-patch: use cgit_version not CGIT_VERSIONJohn Keeping1-1/+1 2013-03-20Makefile: re-use Git's Makefile where possibleJohn Keeping3-119/+80