Micro optimization pt. 2

This commit is contained in:
Simon 2018-11-05 17:38:33 -05:00
parent 1b5e6bb7f4
commit 2d72ff3402

View File

@ -66,7 +66,7 @@ func (w WorkerContext) step(job Job) {
}
func DoJob(job *Job, f *File) (newJobs []Job, err error) {
if job.Uri.Path[len(job.Uri.Path)-1] == '/' {
if len(job.Uri.Path) != 0 && job.Uri.Path[len(job.Uri.Path)-1] == '/' {
// Load directory
links, err := GetDir(job, f)
if err != nil {