mirror of
https://github.com/gohugoio/hugo.git
synced 2025-01-12 00:22:31 +00:00
Permit directory removal during static sync
This commit is contained in:
parent
db18fd1582
commit
b0b4b82165
1 changed files with 1 additions and 1 deletions
|
@ -776,7 +776,7 @@ func NewWatcher(port int) error {
|
||||||
// If file doesn't exist in any static dir, remove it
|
// If file doesn't exist in any static dir, remove it
|
||||||
toRemove :=filepath.Join(publishDir, relPath)
|
toRemove :=filepath.Join(publishDir, relPath)
|
||||||
jww.FEEDBACK.Println("File no longer exists in static dir, removing", toRemove)
|
jww.FEEDBACK.Println("File no longer exists in static dir, removing", toRemove)
|
||||||
hugofs.DestinationFS.Remove(toRemove)
|
hugofs.DestinationFS.RemoveAll(toRemove)
|
||||||
} else if err == nil {
|
} else if err == nil {
|
||||||
// If file still exists, sync it
|
// If file still exists, sync it
|
||||||
jww.FEEDBACK.Println("Syncing", relPath, "to", publishDir)
|
jww.FEEDBACK.Println("Syncing", relPath, "to", publishDir)
|
||||||
|
|
Loading…
Reference in a new issue