Is any progress happening on this front?

I've tried about everything I can think of. My first step was to convert
instances of "/" to os.sep so that the correct separator is used on the
correct operating system. This plan seems to have some flaws, as it seems
there are times that "/" needs to be used instead of os.sep, but I'm not
familiar enough with the code to know which is which.

My next step would be to add \\?\ to the beginning of any paths that begin
with '[a-zA-Z]:\', though that may be best left up to the user.

Then, I was going to add a trailing slash to instances of mkdir and listdir,
hoping that will eliminate complaints that \\?\C:\path\to\dir is
syntactically incorrect (since \\?\C:\path\to\dir\ doesn't have the same
errors).

Is anyone else making any progress? I'm happy to help where I can, but this
is a pretty big code base and I've only started to brush the surface.

- Austin

On Tue, Jan 20, 2009 at 7:20 AM, Armando M. Baratti
<[email protected]>wrote:

>  Austin Roberts escreveu:
>
> I've done some rough hacks to the 1.2.5 source to try and test the
> \\?\C:\etc.
>
> I've found that
>
> >>> os.mkdir(u"\\\\?\\c:\\backups\\dir"
>
> Works fine, but
>
> >>> os.mkdir(u"\\\\?\\c:\\backups/dir"
>
> does not.
>
> Unfortunately, the latter is what is produced when rdiff-backup adds a
> directory to the current path. Using os.path.join(existing_path, new_dir)
> will add the separator specific to the host operating system. I'm
> familiarizing myself with the rdiff-backup codebase, so I'm hoping it won't
> be too long before I can figure out where to make the needed changes.
>
> Perhaps someone reading this could point me in the right direction?
>
> - Austin
>
> On Sun, Jan 18, 2009 at 11:42 AM, Andrew Ferguson <[email protected]>wrote:
>
>>
>> On Jan 18, 2009, at 12:36 PM, Andrew Ferguson wrote:
>>
>>> However,
>>>
>>> >>> os.listdir("\\\\?\\c:\\Temp\\")
>>> ['dest', 'source', 'test', 'test-dest']
>>> >>> os.listdir("\\\\?\\c:\\Temp")
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in <module>
>>> WindowsError: [Error 123] The filename, directory name, or volume label
>>> syntax is incorrect: '\\\\?\\c:\\Temp/*.*'
>>>
>>> so, \\?\C:\Temp\ works, but \\?\C:\Temp fails. WTF?
>>>
>>
>>
>>  And a followup, almost as a note, if we change to unicode, then it
>> works...
>>
>> >>> os.listdir("\\\\?\\c:\\Temp")
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>> WindowsError: [Error 123] The filename, directory name, or volume label
>> syntax is incorrect: '\\\\?\\c:\\Temp/*.*'
>>  >>> os.listdir(u"\\\\?\\c:\\Temp")
>> [u'dest', u'source', u'test', u'test-dest']
>>
>>
>> Gah.
>>
>>
>> Andrew
>>
>
> ------------------------------
>
> _______________________________________________
> rdiff-backup-users mailing list at 
> [email protected]http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
>
>  I don't know if it helps, but you can convert mixed paths like that this
> way:
>
> >>> os.sep.join(u"\\\\?\\c:\\backups/dir".split('/'))
> u'\\\\?\\c:\\backups\\dir'
>
>
> --
> Armando M. Baratti
>
> LARC
>   /Pesquisa de Marketing Ltda
> Alameda dos Maracatins, 161 - Indianópolis
> CEP 04089-010 - São Paulo - SP
> Tel.: (11) 5051-3133 - Fax: (11) 5052-5955
> http://www.larc.com.br/
>
> _______________________________________________
> rdiff-backup-users mailing list at [email protected]
> http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> Wiki URL:
> http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
>
_______________________________________________
rdiff-backup-users mailing list at [email protected]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Reply via email to