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