ref: 80e1fd29ab52a608d3f8359b8775b975bf3b59e5
parent: 5b065a27a26fbc70a5383d48b4657bebd4ab5ed5
author: Bjørn Erik Pedersen <[email protected]>
date: Tue Mar 1 11:38:56 EST 2016
Log fsync errors
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -847,7 +847,9 @@
} else if err == nil {
// If file still exists, sync it
logger.Println("Syncing", relPath, "to", publishDir)
- syncer.Sync(filepath.Join(publishDir, relPath), relPath)
+ if err := syncer.Sync(filepath.Join(publishDir, relPath), relPath); err != nil {
+ jww.ERROR.Println(err)
+ }
} else {
jww.ERROR.Println(err)
}
@@ -857,7 +859,9 @@
// For all other event operations Hugo will sync static.
logger.Println("Syncing", relPath, "to", publishDir)
- syncer.Sync(filepath.Join(publishDir, relPath), relPath)
+ if err := syncer.Sync(filepath.Join(publishDir, relPath), relPath); err != nil {
+ jww.ERROR.Println(err)
+ }
}
}