diff --git a/agkyra/syncer/setup.py b/agkyra/syncer/setup.py index d747e1a77cb806c76e8e8560c1b45a514a038391..fb06c2f53129506f54a65a2bbcac130efe863a72 100644 --- a/agkyra/syncer/setup.py +++ b/agkyra/syncer/setup.py @@ -16,6 +16,7 @@ import os import threading import logging +import ctypes from functools import wraps @@ -78,6 +79,10 @@ def check_encoding(): % encoding) +def win_hide_file(path): + ctypes.windll.kernel32.SetFileAttributesW(path, 2) + + class SyncerSettings(): def __init__(self, auth_url, auth_token, container, local_root_path, *args, **kwargs): @@ -177,6 +182,8 @@ class SyncerSettings(): def create_local_dirs(self): self.create_dir(self.local_root_path) self.create_dir(self.cache_path) + if utils.iswin(): + win_hide_file(self.cache_path) self.create_dir(self.cache_hide_path) self.create_dir(self.cache_stage_path) self.create_dir(self.cache_fetch_path)