a3.4.4 another fix

This commit is contained in:
Allen Webster 2016-02-29 00:01:31 -05:00
parent 40f097b896
commit f01d630b6d
2 changed files with 13 additions and 4 deletions

View File

@ -310,8 +310,13 @@ hot_directory_set(System_Functions *system, Hot_Directory *hot_directory,
b32 success = copy_checked(&hot_directory->string, str); b32 success = copy_checked(&hot_directory->string, str);
terminate_with_null(&hot_directory->string); terminate_with_null(&hot_directory->string);
if (success){ if (success){
if (str.size > 0){
system->set_file_list(&hot_directory->file_list, str); system->set_file_list(&hot_directory->file_list, str);
} }
else{
system->set_file_list(&hot_directory->file_list, make_string((char*)1, 0));
}
}
hot_directory_fixup(hot_directory, working_set); hot_directory_fixup(hot_directory, working_set);
} }

View File

@ -450,10 +450,14 @@ Sys_Set_File_List_Sig(system_set_file_list){
} }
} }
else{ else{
if (directory.str == 0){
Win32FreeMemory(file_list->block); Win32FreeMemory(file_list->block);
file_list->block = 0; file_list->block = 0;
file_list->block_size = 0; file_list->block_size = 0;
} }
file_list->infos = 0;
file_list->count = 0;
}
} }
internal internal