Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-11 20:59:07 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-11 21:00:38 +0300
commitc700cdc39cdf6b8801b71b70f704d749650585fd (patch)
treecd3e0d4eb10729d64a4d8f3d6f2433e40e512e8d /commands
parentef3c4a56d8c5e62588b315cea800a15160ea4eb5 (diff)
Replace some leftover os.Stat with hugofs.Source
Diffstat (limited to 'commands')
-rw-r--r--commands/hugo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 628219be3..339f7648a 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -408,7 +408,7 @@ func InitializeConfig(subCmdVs ...*cobra.Command) error {
themeDir := helpers.GetThemeDir()
if themeDir != "" {
- if _, err := os.Stat(themeDir); os.IsNotExist(err) {
+ if _, err := hugofs.Source().Stat(themeDir); os.IsNotExist(err) {
return newSystemError("Unable to find theme Directory:", themeDir)
}
}
@@ -593,7 +593,7 @@ func getDirList() []string {
jww.ERROR.Printf("Cannot read symbolic link '%s', error was: %s", path, err)
return nil
}
- linkfi, err := os.Stat(link)
+ linkfi, err := hugofs.Source().Stat(link)
if err != nil {
jww.ERROR.Printf("Cannot stat '%s', error was: %s", link, err)
return nil