Branch: Tag:

2002-07-28

2002-07-28 23:54:31 by Martin Nilsson <mani@lysator.liu.se>

Fixed a bug in dirname for shallow paths with no leading slash.

Rev: lib/master.pike.in:1.211

6:   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.210 2002/07/23 14:06:10 mast Exp $ + // $Id: master.pike.in,v 1.211 2002/07/28 23:54:31 nilsson Exp $      #pike __REAL_VERSION__   
187:   {    if(x=="") return "";    array(string) tmp=EXPLODE_PATH(x); -  if(sizeof(tmp)<3) return "/"; +  if(x[0]=='/' && sizeof(tmp)<3) return "/";    return tmp[..sizeof(tmp)-2]*"/";   }