@LiquidCake commented on this pull request.
temp_file_number = atoi(temp_file_number_str);
+ + if (temp_file_number > max_temp_file_number) + { + max_temp_file_number = temp_file_number; + } + + g_free(temp_file_number_str); + } + + g_free(utf8_filename); + } + + g_dir_close(dir); + + return g_strdup_printf(_("%s%d"), PERSISTENT_TEMP_FILE_NAME_PREFIX, max_temp_file_number + 1);
done