Fix file that starts with same name as a folder being perceived as in folder

Solves #1637
This commit is contained in:
Gina Häußge 2016-12-09 13:40:06 +01:00
parent 102727b122
commit ccbf71a96a

View file

@ -511,7 +511,7 @@ class LocalFileStorage(StorageInterface):
filepath = self.sanitize_path(filepath)
path = self.sanitize_path(path)
return filepath.startswith(path)
return filepath == path or filepath.startswith(path + "/")
def file_exists(self, path):
path, name = self.sanitize(path)