pike.git/
lib/
master.pike.in
Branch:
Tag:
Non-build tags
All tags
No tags
2002-07-28
2002-07-28 23:54:31 by Martin Nilsson <mani@lysator.liu.se>
bd220865fd959d9df1aa84c88d8e69c0e581f76e (
5
lines) (+
3
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
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]*"/"; }