44 "errors"
55 "log"
66 "os"
7- "path"
87 "path/filepath"
98 "regexp"
109 "strings"
@@ -84,8 +83,8 @@ func (rf realFile) Data() ([]byte, error) {
8483}
8584
8685func (af assetFile ) Name () string {
87- fn := path .Base (string (af ))
88- return fn [:len (fn )- len (path .Ext (fn ))]
86+ fn := filepath .Base (string (af ))
87+ return fn [:len (fn )- len (filepath .Ext (fn ))]
8988}
9089
9190func (af assetFile ) Data () ([]byte , error ) {
@@ -125,8 +124,8 @@ func AddRuntimeFilesFromAssets(fileType RTFiletype, directory, pattern string) {
125124
126125assetLoop:
127126 for _ , f := range files {
128- if ok , _ := path .Match (pattern , f ); ok {
129- af := assetFile (path .Join (directory , f ))
127+ if ok , _ := filepath .Match (pattern , f ); ok {
128+ af := assetFile (filepath .Join (directory , f ))
130129 for _ , rf := range realFiles [fileType ] {
131130 if af .Name () == rf .Name () {
132131 continue assetLoop
@@ -167,7 +166,7 @@ func InitRuntimeFiles(user bool) {
167166 if user {
168167 AddRuntimeFilesFromDirectory (fileType , filepath .Join (ConfigDir , dir ), pattern )
169168 }
170- AddRuntimeFilesFromAssets (fileType , path .Join ("runtime" , dir ), pattern )
169+ AddRuntimeFilesFromAssets (fileType , filepath .Join ("runtime" , dir ), pattern )
171170 }
172171
173172 initRuntimeVars ()
@@ -300,7 +299,7 @@ func PluginAddRuntimeFile(plugin string, filetype RTFiletype, filePath string) e
300299 if _ , err := os .Stat (fullpath ); err == nil {
301300 AddRealRuntimeFile (filetype , realFile (fullpath ))
302301 } else {
303- fullpath = path .Join ("runtime" , "plugins" , pldir , filePath )
302+ fullpath = filepath .Join ("runtime" , "plugins" , pldir , filePath )
304303 AddRuntimeFile (filetype , assetFile (fullpath ))
305304 }
306305 return nil
@@ -317,7 +316,7 @@ func PluginAddRuntimeFilesFromDirectory(plugin string, filetype RTFiletype, dire
317316 if _ , err := os .Stat (fullpath ); err == nil {
318317 AddRuntimeFilesFromDirectory (filetype , fullpath , pattern )
319318 } else {
320- fullpath = path .Join ("runtime" , "plugins" , pldir , directory )
319+ fullpath = filepath .Join ("runtime" , "plugins" , pldir , directory )
321320 AddRuntimeFilesFromAssets (filetype , fullpath , pattern )
322321 }
323322 return nil
0 commit comments