Skip to content
Snippets Groups Projects
Commit 67956f3d authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Fixed bug in recursive_rm().

Rev: lib/modules/Stdio.pmod/module.pmod:1.79
parent c4c6c79d
No related branches found
No related tags found
No related merge requests found
// $Id: module.pmod,v 1.78 2000/03/27 10:43:56 grubba Exp $ // $Id: module.pmod,v 1.79 2000/03/27 12:28:07 grubba Exp $
import String; import String;
...@@ -845,7 +845,7 @@ int mkdirhier (string dir, void|int mode) ...@@ -845,7 +845,7 @@ int mkdirhier (string dir, void|int mode)
int recursive_rm (string path) int recursive_rm (string path)
{ {
int res = 1; int res = 1;
if ( file_stat( path+"/"+name, 1 )[1] == -2 ) if ( file_stat( path, 1 )[1] == -2 )
if (array(string) sub = get_dir (path)) if (array(string) sub = get_dir (path))
foreach( sub, string name ) foreach( sub, string name )
if (!recursive_rm (path + "/" + name)) if (!recursive_rm (path + "/" + name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment