diff --git a/src/std/c_dir.c b/src/std/c_dir.c index 62a639621..4c5bd3a12 100644 --- a/src/std/c_dir.c +++ b/src/std/c_dir.c @@ -99,7 +99,7 @@ int c_rmdirs(const char *path) { if ((d = _topendir(wpath)) != NULL) { while( _tstat(wpath, &sb) == 0) { /* if we can remove the directory we're done */ - if (_trmdir(path) == 0) { + if (_trmdir(wpath) == 0) { break; } switch (errno) {