From: Steve Francia Date: Tue, 26 Jan 2016 19:11:22 +0000 (-0500) Subject: Permit directory removal during static sync X-Git-Tag: v0.16~407 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b0b4b821;p=brevno-suite%2Fhugo Permit directory removal during static sync --- diff --git a/commands/hugo.go b/commands/hugo.go index 35acbf29..1fd10728 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -776,7 +776,7 @@ func NewWatcher(port int) error { // If file doesn't exist in any static dir, remove it toRemove :=filepath.Join(publishDir, relPath) jww.FEEDBACK.Println("File no longer exists in static dir, removing", toRemove) - hugofs.DestinationFS.Remove(toRemove) + hugofs.DestinationFS.RemoveAll(toRemove) } else if err == nil { // If file still exists, sync it jww.FEEDBACK.Println("Syncing", relPath, "to", publishDir)