Commits

Gabriele Lanaro  committed cf42ace

Application tested on windows, done minor changes

  • Participants
  • Parent commits 3603bab

Comments (0)

Files changed (2)

File filesnake/__main__.py

 if settings.avahi_available:
     from zeroconf.avahilib import AvahiServicePublisher as ServicePublisher
 else:
-    from zeroconf.bonjourlib import BonjourServicePublisher as ServicePublisher
+    try:
+        from zeroconf.bonjourlib import BonjourServicePublisher as ServicePublisher
+    except WindowsError:
+        raise Exception("Could not found bonjour library, provide installing it: search the web bonjour for windows")
 
 from .gui.main_win import FileSnakeGUI
 

File filesnake/settings.py

 except ImportError:
     avahi_available = False
 
-import os
+import os,sys
 from ConfigParser import ConfigParser
 
-config_path = os.environ.get("HOME")
+if sys.platform=="win32":
+    home = os.environ.get("HOMEPATH")
+else:
+    home = os.environ.get("HOME")
+
+config_path = home
+
 config_file_name = ".filesnake"
 config_file_path = os.path.join(config_path, config_file_name)
 
-config = ConfigParser({"dest_dir":os.environ.get("HOME")})    
+config = ConfigParser({"dest_dir": home})    
 config.add_section("path")
 
 config.read([config_file_path])