Re: Dealing with relative paths to local file's URIs



On Sat, 2002-09-07 at 03:40, Chipzz wrote:
> On Fri, 6 Sep 2002, Archit Baweja wrote:
> > I recently converted the File I/O of my HTML Editor to GnomeVFS (it previously
> > used the standard FILE* API of the standard C lib).
> >
> > However for local files, now it only accepts the absolute path to the file.
> > Relative paths like some/weird/foo/bar/dir/file or ./filename or ../filename
> > are no longer accepted, and gnome_vfs_open_uri gives the "Invalid URI" error.
> >
> > So any suggested way to deal with this shortcoming/problem of GnomeVFS? Maybe
> > using stat in conjungtion with GnomeVFS or is there a helper API to the
> > GnomeVFSURI API?
> >
> You should be aware that relative uri's are resolved relative to _your
> home dir_, NOT to the current dir. And yes, think that's a bug...

Okay, this is clearly an unacceptable limitation. I think changing the
existing behaviour of gnome_vfs_uri_new would be bad but perhaps we
should add a new function that constructs a URI relative to the current
directory? We can put this in 2.2 and people can copy&paste it till
then.

Ian

Attachment: signature.asc
Description: This is a digitally signed message part



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