Comment 6 for bug 727469

Revision history for this message
David Gamba (davidgamba) wrote :

Adding / at the end of the folder variable in gconf fixed for me, though it would be nice to have a backup option (in case one forgets) so I made this patch.

I also changed the default in configurator.py for it con contain a / at the end

PS: My brother tried the patch you made and it didn't work for him so I treated the fullpath as a string instead.
PPS: your plugin rocks, I have been looking for so long for something like this!!! :)

--- tools.py~ 2011-03-01 11:38:39.317607842 -0600
+++ tools.py 2011-03-02 10:33:17.377155000 -0600
@@ -14,9 +14,10 @@
 # Create a folder if non-existant, and return it
 def folderize(configurator, folder):
     dir = ((configurator.get_val('library_locations').get_list())[0].get_string() + '/').replace('file:///','/')
- if not os.path.exists(dir + folder):
- os.makedirs(dir + folder)
- return os.path.dirname(dir + folder)
+ fullpath = str(dir) + folder + '/'
+ if not os.path.exists(fullpath):
+ os.makedirs(fullpath)
+ return os.path.dirname(fullpath)

 # Replace the placeholders with the correct values
 def data_filler(file, string):