summaryrefslogtreecommitdiffstats
path: root/commands/static_syncer.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-11 09:48:20 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-11 13:10:47 +0100
commit64b7b7a89753a39661219b2fcb92d7f185a03f63 (patch)
treefc0a936c03faffd4acfd28b4997f499e4109dcfb /commands/static_syncer.go
parent5ef8a9f32c25a9b4cc821393c58733e57a7ad234 (diff)
Revert "Allow rendering static files to disk and dynamic to memory in server mode"
This reverts commit 7d8011ed63d587b87a7c182748914fe146590093. Updates #9647
Diffstat (limited to 'commands/static_syncer.go')
-rw-r--r--commands/static_syncer.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/commands/static_syncer.go b/commands/static_syncer.go
index 2eb2b6662..5569d4de6 100644
--- a/commands/static_syncer.go
+++ b/commands/static_syncer.go
@@ -56,9 +56,6 @@ func (s *staticSyncer) syncsStaticEvents(staticEvents []fsnotify.Event) error {
syncer.ChmodFilter = chmodFilter
syncer.SrcFs = sourceFs.Fs
syncer.DestFs = c.Fs.Destination
- if c.renderStaticToDisk {
- syncer.DestFs = c.Fs.DestinationStatic
- }
// prevent spamming the log on changes
logger := helpers.NewDistinctErrorLogger()
@@ -104,11 +101,7 @@ func (s *staticSyncer) syncsStaticEvents(staticEvents []fsnotify.Event) error {
toRemove := filepath.Join(publishDir, relPath)
logger.Println("File no longer exists in static dir, removing", toRemove)
- if c.renderStaticToDisk {
- _ = c.Fs.DestinationStatic.RemoveAll(toRemove)
- } else {
- _ = c.Fs.Destination.RemoveAll(toRemove)
- }
+ _ = c.Fs.Destination.RemoveAll(toRemove)
} else if err == nil {
// If file still exists, sync it
logger.Println("Syncing", relPath, "to", publishDir)