pagr

A 'static site generator', built using dati.
Log | Files | Refs | Atom

commit a8111417f4273d28b8a6a9b5c875abc60d78bde0
parent d4c2bc764343d813641b036ada485fbc1d78a8b9
Author: gearsix <gearsix@tuta.io>
Date:   Mon, 14 Mar 2022 11:12:01 +0000

bugfix in copy.go where dst doesnt exist yet

Diffstat:
Mcopy.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/copy.go b/copy.go @@ -71,8 +71,8 @@ func CopyFile(src, dst string) (err error) { return err } - // only copy if files have different name/size - if (srcfi.Name == dstfi.Name && srcfi.size == dstfi.Size) { + // only copy if dst doesnt exist or has different name/size + if (dstfi == nil || srcfi.Name() == dstfi.Name() && srcfi.Size() == dstfi.Size()) { cSrc := C.CString(src) cDst := C.CString(dst) if uint32(C.copyf(cSrc, cDst)) != 0 {