# HG changeset patch # User John W. Eaton # Date 1233258758 18000 # Node ID cbd6545b0d85b21b1b9b1914ce34ba1034092c12 # Parent 0c5541c39a421f823ad604266c2d21f853988d19 fileparts.m: match all possible file separators diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-01-29 John W. Eaton + + * miscellaneous/fileparts.m: Match all possible file separators. + 2009-01-29 Kai Habel * plot/__go_draw_axes__.m: Add support for transparent patches. diff --git a/scripts/miscellaneous/fileparts.m b/scripts/miscellaneous/fileparts.m --- a/scripts/miscellaneous/fileparts.m +++ b/scripts/miscellaneous/fileparts.m @@ -27,7 +27,10 @@ if (nargin == 1) if (ischar (filename)) - ds = rindex (filename, filesep); + ds = strchr (filename, filesep ("all"), 1, "last"); + if (isempty (ds)) + ds = 0; + endif es = rindex (filename, "."); ## These can be the same if they are both 0 (no dir or ext). if (es <= ds)