diff options
-rw-r--r-- | source/kit/file.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/kit/file.c b/source/kit/file.c index 41b5b9c..9391ea7 100644 --- a/source/kit/file.c +++ b/source/kit/file.c @@ -308,12 +308,8 @@ kit_status_t kit_file_remove_recursive(kit_str_t path, } for (i = 0; i < list.files.size; i++) { - printf(" JOIN \"%s\" + \"%s\" \n", BS(path), - BS(list.files.values[i])); str_builder_t full_path = kit_path_join( path, WRAP_STR(list.files.values[i]), alloc); - printf(" REMOVE %s (%d bytes) \n", BS(full_path), - (int) full_path.size); kit_status_t s = kit_file_remove_recursive( WRAP_STR(full_path), alloc); DA_DESTROY(full_path); @@ -412,13 +408,13 @@ kit_path_list_t kit_folder_enum(kit_str_t path, DA_INIT(result.files, 0, alloc); #if defined(_WIN32) && !defined(__CYGWIN__) - if (path.size + 7 >= PATH_BUF_SIZE) { + if (path.size + 3 >= PATH_BUF_SIZE) { result.status = KIT_ERROR_PATH_TOO_LONG; return result; } - buf[path.size + 4] = '\\'; - buf[path.size + 5] = '*'; + buf[path.size] = '\\'; + buf[path.size + 1] = '*'; WIN32_FIND_DATAW data; HANDLE find = FindFirstFileA(buf, &data); @@ -434,7 +430,6 @@ kit_path_list_t kit_folder_enum(kit_str_t path, break; } - printf(" ENUM %s \n", data.cFileName); i64 size = 0; while (size < MAX_PATH && data.cFileName[size] != '\0') size++; DA_INIT(result.files.values[n], size, alloc); |