Previous 15994 Revisions Next

r9140 Wednesday 15th September, 2010 at 19:55:04 UTC by Tim Lindner
Fixed a bug in writing files and directories
that use path seperators other than the backslash.
[src/mess/tools/imgtool/windows]wimgtool.c

src/mess/tools/imgtool/windows/wimgtool.c
r9139r9140
12501250   imgtoolerr_t err;
12511251   char *image_filename = NULL;
12521252   const char *s1;
1253   char *s2;
12541253   win_open_file_name ofn;
12551254   wimgtool_info *info;
12561255   option_resolution *opts = NULL;
r9139r9140
13171316   /* append the current directory, if appropriate */
13181317   if (info->current_directory != NULL)
13191318   {
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);
13251320   }
13261321
13271322   err = imgtool_partition_write_file(info->partition, image_filename, fork, stream, opts, filter);
r9139r9140
15631558
15641559   if (info->current_directory)
15651560   {
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);
15701562      osd_free(utf8_dirname);
15711563      utf8_dirname = mame_strdup(s);
15721564   }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team