|
From: | Josh Nisly |
Subject: | Re: [rdiff-backup-users] Native Windows Port |
Date: | Fri, 04 Apr 2008 07:16:45 -0500 |
User-agent: | Thunderbird 2.0.0.12 (X11/20080227) |
Patrick Nagel wrote:
Yes, I've seen these. You have to be careful, though, because you can't use the client's normpath for remote paths, and vice versa.Hi Josh, Josh Nisly (Friday, 2008-04-04):I'm attempting to make a native Windows port of rdiff-backup. I've succeeded so far in building librsync and rdiff-backup's cmodules, as well as fixing rdiff-backup's fs_abilities checks. What I'm running up against now is that there seems to be a lot of assumptions that the directory separator is "/", which obviously doesn't work on windows. I think that the correct solution is to memorize in either the Connection or RPath objects what the correct separator is, and use that everywhere. Does this seem like the correct solution? Has anybody else tried porting to Windows recently? There's an old page on the wiki with some high-level notes, but I couldn't find anything else.Did you have a look at http://www.python.org/doc/2.3.5/lib/module-os.path.html ? Especially 'normpath(path)'.
In my opinion it would be best to have something like 'native directory separators' that are just a 'translation' of the internally used separators (UNIX style), like it's done in Qt (http://doc.trolltech.com/4.3/qdir.html). So only each ported rdiff-backup instance must know what it's running on, and nothing would change in the communication.I think this makes sense. It at least makes the port easier, because all the patch knowledge can be contained inside of RPath, and everyone outside of that class can just use "/".
You'll also have to deal with that strange 'drive' foo (mount point designations, e.g. C:) - see 'splitdrive(path)' - that probably entails modifications in also the non-ported rdiff-backup version.
That's possible. I'll look into it. Josh Nisly
[Prev in Thread] | Current Thread | [Next in Thread] |