From bug-octave-request at bevo dot che dot wisc dot edu Sat Dec 20 20:54:06 2003 Subject: [p,f,e]=fileparts('test/dir.001/file') returns empty f From: Schloegl Alois To: bug-octave at bevo dot che dot wisc dot edu Date: Sat, 20 Dec 2003 14:46:37 -0600 Bug report for Octave 2.1.52 configured for i686-pc-linux-gnu Description: ----------- The output of FILEPARTS is incorrect, if any directory name contains a dot and the file has no extension. Repeat-By: --------- octave:13> [p,f,e]=fileparts('test/dir.001/filename'), ### note the file has no extension p = test/dir.001 f = e = .001/filename Fix: --- This patch solves the problem. *** fileparts.m.old Sat Dec 20 21:23:45 2003 --- fileparts.m Sat Dec 20 21:23:35 2003 *************** *** 29,34 **** --- 29,35 ---- if (isstr (filename)) ds = rindex (filename, filesep); es = rindex (filename, "."); + if es