|
From: | Marc Dyksterhouse |
Subject: | Re: [rdiff-backup-users] More patches to get rdiff-backup working under cygwin/windows |
Date: | Mon, 29 Jan 2007 00:06:51 -0500 |
User-agent: | Thunderbird 1.5.0.9 (Windows/20061207) |
Dean,I looked into what was happening with fsync under cygwin. Turns out fsync returns EACCES for any file so I added that to the except clause to prevent the exception from being re-raised. After fixing that, a few more exceptions where happening because the 'data' array is not filled in under cygwin (not sure why). I put some checks around some of the places that data['xxx'] is accessed to prevent the exceptions.
The result is a new rpath.py patch (link below) that seems to work and should be cross platform.
I'm also submitting a second fs_abilities.py patch. This one addresses your concern about which chars are quoted. The problem with the original regex is that it didn't quote * or ". My new regex only quotes the chars that are not valid in FAT-32 plus the semicolon since that's the escape char. New regex: '\000-\037\"*/:<>?\\\\|;'
Complete list: http://www.visiwave.com/download/rdiff_backup/rpath.py.patch http://www.visiwave.com/download/rdiff_backup/Security.py.patch http://www.visiwave.com/download/rdiff_backup/fs_abilities.py.patch http://www.visiwave.com/download/rdiff_backup/fs_abilities.py.2.patch http://www.visiwave.com/download/rdiff_backup/FilenameMapping.py.patchNote that the last three are interdependent and that fs_abilities.py.patch needs to be applied before fs_abilities.py.2.patch. Also note that the Security.py and FilenameMapping.py patches did not change from my original post.
Regards, marc dean gaudet wrote:
On Fri, 26 Jan 2007, Marc Dyksterhouse wrote:http://www.visiwave.com/download/rdiff_backup/rpath.py.patchcan you provide more information on why this is necessary? i'm assuming it's because cygwin/windows can't do an fsync in some situation...would it be possible to put another try/except around the os.fsync to catch that case instead of just disabling the fsync entirely? i don't think i want to commit this patch as is... unless that fsync really isn't necessary.http://www.visiwave.com/download/rdiff_backup/Security.py.patchcommitted to cvs HEADhttp://www.visiwave.com/download/rdiff_backup/FilenameMapping.py.patchcommitted to cvs HEADhttp://www.visiwave.com/download/rdiff_backup/fs_abilities.py.patchhmm i'm committing this anyhow because i didn't notice the previous patch depends on it... next time send them in order please :)but -- can you expand on this chunk: - else: return "^a-z0-9_ -." # quote everything but basic chars + else: return "^a-z0-9_ .-" # quote everything but basic charsif self.dest_fsa.extended_filenames:return "" # Don't quote anything - else: return "^A-Za-z0-9_ -." + else: return "^A-Za-z0-9_ .-" " -." is a valid range... so this change will start escaping those things except for space dot dash... this was intentional?oh and... i tested none of this. i encourage folks to grab the cvs head and report back if it's broken or not.-dean
[Prev in Thread] | Current Thread | [Next in Thread] |