When and why should I escape a path string?



Hi,

I just encountered a bug in my program, where I would try to create a Gnome::Vfs::Uri from an escaped path (the directory in question was the 'lost+found' directory which is found on ext3 partitions and which was converted by gnome-vfs to 'lost%2Bfound'). I was getting exceptions thrown at me when trying to create an URI from this string ("file does not exist").

After unescaping the string, creating an URI from it worked. So when and why am I supposed to use escaped paths? Obviously, gnome-vfs somewhere internally already escaped the path, so it should be able to deal with them. But then, why does creating an URI from an escaped path fail? ^^

Thanks,
Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]