a3.4.4 another fix

master
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,7 +310,12 @@ hot_directory_set(System_Functions *system, Hot_Directory *hot_directory,
b32 success = copy_checked(&hot_directory->string, str);
terminate_with_null(&hot_directory->string);
if (success){
system->set_file_list(&hot_directory->file_list, str);
if (str.size > 0){
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);
}

View File

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