From 6bfff623c2ab1e051ed76e08cb8d2435a14bab34 Mon Sep 17 00:00:00 2001
From: Giorgos Korfiatis <gkorf@grnet.gr>
Date: Thu, 30 Jul 2015 18:36:54 +0300
Subject: [PATCH] hide cache path on windows

---
 agkyra/syncer/setup.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/agkyra/syncer/setup.py b/agkyra/syncer/setup.py
index d747e1a..fb06c2f 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)
-- 
GitLab