pkg/fileutil: expose PrivateFileMode/DirMode

This commit is contained in:
Gyu-Ho Lee
2016-06-10 15:18:29 -07:00
parent 4570eddc2c
commit 47d5257622
5 changed files with 14 additions and 13 deletions

View File

@ -40,7 +40,7 @@ func PurgeFile(dirname string, suffix string, max uint, interval time.Duration,
sort.Strings(newfnames)
for len(newfnames) > int(max) {
f := path.Join(dirname, newfnames[0])
l, err := TryLockFile(f, os.O_WRONLY, 0600)
l, err := TryLockFile(f, os.O_WRONLY, PrivateFileMode)
if err != nil {
break
}