Optimise findFile

This commit is contained in:
Les De Ridder 2016-10-24 03:21:58 +02:00
parent dd21635050
commit a9268426e6
No known key found for this signature in database
GPG Key ID: 5EC132DFA85DB372
1 changed files with 1 additions and 2 deletions

View File

@ -107,7 +107,7 @@ class FileSystem : Operations
return null; 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) string[] getTags(const(char)[] path)
@ -149,7 +149,6 @@ class FileSystem : Operations
} }
} }
override string[] readdir(const(char)[] path) override string[] readdir(const(char)[] path)
{ {
if(path in _dirCache) if(path in _dirCache)