src/mess/tools/imgtool/windows/wimgtool.c
| r9139 | r9140 | |
| 1250 | 1250 | imgtoolerr_t err; |
| 1251 | 1251 | char *image_filename = NULL; |
| 1252 | 1252 | const char *s1; |
| 1253 | | char *s2; |
| 1254 | 1253 | win_open_file_name ofn; |
| 1255 | 1254 | wimgtool_info *info; |
| 1256 | 1255 | option_resolution *opts = NULL; |
| r9139 | r9140 | |
| 1317 | 1316 | /* append the current directory, if appropriate */ |
| 1318 | 1317 | if (info->current_directory != NULL) |
| 1319 | 1318 | { |
| 1320 | | s2 = (char *) alloca(strlen(info->current_directory) + strlen(image_filename) + 1 + 1); |
| 1321 | | strcpy(s2, info->current_directory); |
| 1322 | | strcat(s2, "\\"); |
| 1323 | | strcat(s2, image_filename); |
| 1324 | | image_filename = s2; |
| 1319 | image_filename = (char *) imgtool_partition_path_concatenate(info->partition, info->current_directory, image_filename); |
| 1325 | 1320 | } |
| 1326 | 1321 | |
| 1327 | 1322 | err = imgtool_partition_write_file(info->partition, image_filename, fork, stream, opts, filter); |
| r9139 | r9140 | |
| 1563 | 1558 | |
| 1564 | 1559 | if (info->current_directory) |
| 1565 | 1560 | { |
| 1566 | | s = (char *) alloca(strlen(info->current_directory) + strlen(utf8_dirname) + 1 + 1); |
| 1567 | | strcpy(s, info->current_directory); |
| 1568 | | strcat(s, "\\"); |
| 1569 | | strcat(s, utf8_dirname); |
| 1561 | s = (char *) imgtool_partition_path_concatenate(info->partition, info->current_directory, utf8_dirname); |
| 1570 | 1562 | osd_free(utf8_dirname); |
| 1571 | 1563 | utf8_dirname = mame_strdup(s); |
| 1572 | 1564 | } |