diff options
author | srinivasreddy <thatiparthysreenivas@gmail.com> | 2016-03-12 23:46:31 +0530 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-03-17 20:11:29 +0100 |
commit | 21054f730af52efbef22f5986daf97a52d6630de (patch) | |
tree | d9d549d130128da483cd2346a5064daf26ddd8d0 | |
parent | df44b1930a8b5be8959a808fc788a42c6b0166bb (diff) |
source: Consolidate filepath.Split calls
-rw-r--r-- | source/file.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/file.go b/source/file.go index efe604912..2bd6d2e1c 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()) |