Replace some leftover os.Stat with hugofs.Source

This commit is contained in:
Bjørn Erik Pedersen
2016-09-11 19:59:07 +02:00
parent ef3c4a56d8
commit c700cdc39c
3 changed files with 6 additions and 4 deletions

View File

@@ -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