mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Permit directory removal during static sync
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user