local backend: Drop file content from cache after write

This commit is contained in:
Alexander Neumann 2016-03-28 15:24:18 +02:00
parent 5b5bb070b9
commit b7713d2d34

View file

@ -10,6 +10,7 @@ import (
"restic/backend"
"restic/debug"
"restic/fs"
)
// Local is a backend in a local directory.
@ -146,6 +147,11 @@ func writeToTempfile(tempdir string, p []byte) (filename string, err error) {
return "", err
}
err = fs.ClearCache(tmpfile)
if err != nil {
return "", err
}
err = tmpfile.Close()
if err != nil {
return "", err