diff --git a/timeside/server/management/commands/timeside-cleanup-db-and-media.py b/timeside/server/management/commands/timeside-cleanup-db-and-media.py index 83ea5309..15d9e569 100644 --- a/timeside/server/management/commands/timeside-cleanup-db-and-media.py +++ b/timeside/server/management/commands/timeside-cleanup-db-and-media.py @@ -53,6 +53,6 @@ def handle(self, *args, **options): for root, dirs, files in os.walk(settings.MEDIA_ROOT): for f in files: path = os.path.join(root, f) - if path not in media_paths: + if path[0] != '.' and path not in media_paths: os.remove(path) # TODO remove empty folders