X-Git-Url: https://ruderich.org/simon/gitweb/?p=nsscash%2Fnsscash.git;a=blobdiff_plain;f=file.go;h=3884bba8b6ae3c4f0e6d86f26d796fd5fcac0952;hp=f382ba4ef8bdcae5100d568cdd09009fef0b33b4;hb=HEAD;hpb=4d994341317c2e700370950bd5fd9ac05963fc66 diff --git a/file.go b/file.go index f382ba4..3884bba 100644 --- a/file.go +++ b/file.go @@ -1,6 +1,6 @@ // Download and write files atomically to the file system -// Copyright (C) 2019-2020 Simon Ruderich +// Copyright (C) 2019-2021 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by @@ -198,5 +198,9 @@ func deployFile(file *File) error { if err != nil { return err } - return f.CloseAtomicallyReplace() + err = f.CloseAtomicallyReplace() + if err != nil { + return err + } + return syncPath(filepath.Dir(file.Path)) }