Fix panic

master
Jan-Lukas Else 2020-01-12 18:26:21 +01:00
parent 2872afbc28
commit 85adb26acd
1 changed files with 1 additions and 0 deletions

View File

@ -286,6 +286,7 @@ func ReadEntry(url string) (entry *Entry, err error) {
} }
fileContent, _, exists, err := SelectedStorage.ReadFile(filePath) fileContent, _, exists, err := SelectedStorage.ReadFile(filePath)
if err != nil || !exists { if err != nil || !exists {
err = errors.New("failed to read file or entry doesn't exist")
return return
} }
entry, err = ReadHugoPost(fileContent) entry, err = ReadHugoPost(fileContent)