On Tue, May 06, 2008 at 10:00:38PM +0200, Eric Pouech wrote:
> >              spath = strchr(spath, '\\');
> > -            if (!spath) spath = strchr(spath, '/');
> > +            if (spath) spath = strchr(spath, '/');

So the correct solution would be something like

bpath=strchr(spath, '\\');
spath=strchr(spath, '/');
if (bpath && spath)
        spath=MIN(bpath, spath);
else
        spath=MAX(bpath,spath);

?
Btw, are Unix filenames that contain a '\' a problem?

 Ciao
       Joerg
-- 
Joerg Mayer                                           <[EMAIL PROTECTED]>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.


Reply via email to