Commit 1bea022ff02f97f4d11be7ca3fb85094d8015ee0
1 parent
89a53927
filtering '.' and '..' when emptying folder
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
anubis_dev/library/system/files.anubis
| ... | ... | @@ -520,7 +520,9 @@ define Bool |
| 520 | 520 | { |
| 521 | 521 | [] then true, //we have finished |
| 522 | 522 | [file_name . t ] then |
| 523 | - if remove(path + file_name) then | |
| 523 | + if file_name = "." | file_name = ".." then | |
| 524 | + remove_files(path, t) | |
| 525 | + else if remove(path + file_name) then | |
| 524 | 526 | // println("removing "+path+file_name); |
| 525 | 527 | remove_files(path, t) |
| 526 | 528 | else | ... | ... |