From 2d72ff3402a02514145b634c519fe3b03facacbd Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 5 Nov 2018 17:38:33 -0500 Subject: [PATCH] Micro optimization pt. 2 --- worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker.go b/worker.go index b33c173..43d1df5 100644 --- a/worker.go +++ b/worker.go @@ -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 {