Problem with webdav shares and twowaysync
- From: Yann Rouillard <yann pleiades fr eu org>
- To: conduit-list gnome org
- Subject: Problem with webdav shares and twowaysync
- Date: Mon, 08 Oct 2007 21:45:20 +0200
Hi,
I am currently trying to use conduit to synchronize a local folder with
a webdav remote one and have experienced two bugs.
I already opened a ticket for the first one but I didn't find how to add
a patch or an additionnal comment:
http://www.conduit-project.org/ticket/546
- the first problem is with directory/file names with space in it, they
are not found by conduit during the synchronisation because of some
escaping problem. I was able to fix the bug with the modification given
in the attached patch webdav_space_in_filename_fix.patch
- the second problem is that the "two way sync" setting was never
correctly restored when I reopen conduit. It's properly saved, but at
some point during conduit launch, it is disabled.
I fixed this bug with the modifications given in the attached patch
twowaysync_restore_fix.patch
Yann
--- conduit/Utils.py 2007-09-30 16:12:01.000000000 +0200
+++ conduit/Utils.py.new 2007-10-04 22:49:20.000000000 +0200
@@ -434,24 +434,25 @@
try: fileinfo = hdir.next()
except StopIteration: continue;
while fileinfo:
- if fileinfo.name in [".","..",CONFIG_FILE_NAME]:
+ filename = gnomevfs.escape_path_string(fileinfo.name)
+ if filename in [".","..",CONFIG_FILE_NAME]:
pass
else:
if fileinfo.type == gnomevfs.FILE_TYPE_DIRECTORY:
#Include hidden directories
- if fileinfo.name[0] != "." or self.includeHidden:
- self.dirs.append(dir+"/"+fileinfo.name)
+ if filename[0] != "." or self.includeHidden:
+ self.dirs.append(dir+"/"+filename)
t += 1
elif fileinfo.type == gnomevfs.FILE_TYPE_REGULAR:
try:
- uri = gnomevfs.make_uri_canonical(dir+"/"+fileinfo.name)
+ uri = gnomevfs.make_uri_canonical(dir+"/"+filename)
#Include hidden files
- if fileinfo.name[0] != "." or self.includeHidden:
+ if filename[0] != "." or self.includeHidden:
self.URIs.append(uri)
except UnicodeDecodeError:
raise "UnicodeDecodeError",uri
else:
- logd("Unsupported file type: %s (%s)" % (fileinfo.name, fileinfo.type))
+ logd("Unsupported file type: %s (%s)" % (filename, fileinfo.type))
try: fileinfo = hdir.next()
except StopIteration: break;
#Calculate the estimated complete percentags
diff -ur conduit/conduit/Canvas.py conduit.new/conduit/Canvas.py
--- conduit/conduit/Canvas.py 2007-10-08 21:41:36.000000000 +0200
+++ conduit.new/conduit/Canvas.py 2007-10-07 15:19:33.000000000 +0200
@@ -186,7 +186,7 @@
else:
self.twoWayMenuItem.set_property("sensitive", True)
#Set item ticked if two way sync enabled
- self.twoWayMenuItem.set_active(self.selectedConduitItem.model.twoWaySyncEnabled)
+ self.twoWayMenuItem.set_active(self.selectedConduitItem.model.is_two_way())
#Set item ticked if two way sync enabled
self.slowSyncMenuItem.set_active(self.selectedConduitItem.model.slowSyncEnabled)
#Show the menu
diff -ur conduit/conduit/Conduit.py conduit.new/conduit/Conduit.py
--- conduit/conduit/Conduit.py 2007-10-08 21:41:36.000000000 +0200
+++ conduit.new/conduit/Conduit.py 2007-10-07 15:19:17.000000000 +0200
@@ -117,11 +117,6 @@
logw("Only sinks, sources or twoway dataproviders may be added")
return False
-
- #Check if a two way sync can still be performed
- if not self.can_do_two_way_sync():
- self.disable_two_way_sync()
-
self.emit("dataprovider-added", dataprovider_wrapper)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]