From: Thomas L. <ta...@gm...> - 2006-12-17 12:57:57
|
On Sun, 10 Dec 2006 09:59:01 +1100, Lennon Cook wrote: > "Thomas Leonard" <ta...@gm...> wrote: >> What does escape(uri) return > escape(file://lennon-desktop/home/lennon/Wallpaper/AddApp): > file://lennon%2ddesktop/home/lennon/Wallpaper/AddApp > >> and why does get_local_path think it's remote? > Because my network-facing hostname contains '-', which is escaped to > %2d, and 'our_host_name()' returns the unescaped form. So, __init__.py > line 328: >> if remote_host == our_host_name(): > turns out to be doing 'lennon-desktop == lennon%2ddesktop' > Changing line 328 to: >> if remot_host == escape(our_host_name()): > Works. Actually, the hostname part shouldn't need unescaping. The real bug is in escape(): re.sub('[^:-_./a-zA-Z0-9]', Adding that ':' to the front in revision 3758 caused the "-" to be interpreted as a range, not a character. Oops. Fixed now - thanks! -- Dr Thomas Leonard http://rox.sourceforge.net GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 |