hamster-applet r643 - branches/gnome-2-24/hamster



Author: tbaugis
Date: Mon Nov 24 23:31:09 2008
New Revision: 643
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=643&view=rev

Log:
when copying database file, make sure that we have proper permissions
fixes bug 562190. Patch with modifications by Jasper Lievisse Adriaanse .

Modified:
   branches/gnome-2-24/hamster/__init__.py

Modified: branches/gnome-2-24/hamster/__init__.py
==============================================================================
--- branches/gnome-2-24/hamster/__init__.py	(original)
+++ branches/gnome-2-24/hamster/__init__.py	Mon Nov 24 23:31:09 2008
@@ -75,6 +75,12 @@
     print "Database not found in %s - installing default from %s!" % (HAMSTER_DB, SHARED_DATA_DIR)
     copyfile(join(SHARED_DATA_DIR, DB_FILE), HAMSTER_DB)
 
+	# change also permissions (sometimes they are 444)
+    try:
+    	os.chmod(HAMSTER_DB, 0664)
+    except Exception, msg:	
+        print 'Error:could not change mode on %s!' % (HAMSTER_DB)
+
 # Init storage
 
 dispatcher = Dispatcher()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]