From a9268426e64da52e1718a4a856ecb3eec74f8f90 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Mon, 24 Oct 2016 03:21:58 +0200 Subject: [PATCH] Optimise findFile --- source/filesystem.d | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/filesystem.d b/source/filesystem.d index 736a135..5b8d010 100644 --- a/source/filesystem.d +++ b/source/filesystem.d @@ -107,7 +107,7 @@ class FileSystem : Operations return null; } - return _tagCache.keys.filter!(a => indexOf(a, name) != -1).array[0]; + return _tagCache.keys.find!(a => a.baseName == name)[0]; } string[] getTags(const(char)[] path) @@ -149,7 +149,6 @@ class FileSystem : Operations } } - override string[] readdir(const(char)[] path) { if(path in _dirCache)