From: srinivasreddy Date: Sat, 12 Mar 2016 18:16:31 +0000 (+0530) Subject: source: Consolidate filepath.Split calls X-Git-Tag: v0.16~223 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=21054f730af52efbef22f5986daf97a52d6630de;p=brevno-suite%2Fhugo source: Consolidate filepath.Split calls --- diff --git a/source/file.go b/source/file.go index efe60491..2bd6d2e1 100644 --- a/source/file.go +++ b/source/file.go @@ -92,8 +92,7 @@ func NewFile(relpath string) *File { relpath: relpath, } - f.dir, _ = filepath.Split(f.relpath) - _, f.logicalName = filepath.Split(f.relpath) + f.dir, f.logicalName = filepath.Split(f.relpath) f.ext = strings.TrimPrefix(filepath.Ext(f.LogicalName()), ".") f.section = helpers.GuessSection(f.Dir()) f.uniqueID = helpers.Md5String(f.LogicalName())