@@ -88,12 +88,12 @@ func (driver *FTPDriver) dirPathToTitleID(path string) (uint64, error) {
88
88
titleID , err := strconv .ParseUint (match [1 ], 10 , 64 )
89
89
return titleID , err
90
90
}
91
- return 0 , errors .New ("couldnt parse" )
91
+ return 0 , errors .New ("couldn't parse" )
92
92
}
93
93
94
94
func (driver * FTPDriver ) getFakeFolderFileInfo (titleInfo index.FileOnDiskRecord ) os.FileInfo {
95
- virtualpath := fmt .Sprintf ("%s [%d]" , utilities .CleanName (titleInfo .Name ), titleInfo .TitleID )
96
- info := NewFakeFolder (virtualpath )
95
+ virtualPath := fmt .Sprintf ("%s [%d]" , utilities .CleanName (titleInfo .Name ), titleInfo .TitleID )
96
+ info := NewFakeFolder (virtualPath )
97
97
return & info
98
98
}
99
99
@@ -113,20 +113,20 @@ func (driver *FTPDriver) ListDir(ctx *ftpserver.Context, path string, callback f
113
113
if titleID , err := driver .dirPathToTitleID (path ); err == nil {
114
114
val , ok := driver .library .FileIndex .GetFilesForTitleID (titleID )
115
115
if ok {
116
- //Now need to yield os info's for all of the underlying files
116
+ //Now need to yield os info's for all the underlying files
117
117
for _ , file := range val .GetFiles () {
118
118
info , err := os .Stat (file .Path )
119
119
if err == nil {
120
- fakefile := NewFakeFile (driver .getfakepathForRealFile (file ), info )
121
- _ = callback (& fakefile )
120
+ fakeFile := NewFakeFile (driver .getFakePathForRealFile (file ), info )
121
+ _ = callback (& fakeFile )
122
122
}
123
123
}
124
124
}
125
125
}
126
126
}
127
127
return nil
128
128
}
129
- func (driver * FTPDriver ) getfakepathForRealFile (file index.FileOnDiskRecord ) string {
129
+ func (driver * FTPDriver ) getFakePathForRealFile (file index.FileOnDiskRecord ) string {
130
130
ext := path .Ext (file .Path )
131
131
fileTitle := fmt .Sprintf ("%s - [%d][%d]%s" , file .Name , file .TitleID , file .Version , ext )
132
132
return path .Join (fileTitle )
0 commit comments