[Extractor-gtk-cvslog] SF.net SVN: extractor-gtk: [58] trunk/extractor/extractor.c
Extract files from unusual archive formats
Brought to you by:
someone-guy
From: <som...@us...> - 2008-02-22 22:05:45
|
Revision: 58 http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=58&view=rev Author: someone-guy Date: 2008-02-22 14:05:39 -0800 (Fri, 22 Feb 2008) Log Message: ----------- Replace '/' in file names by '_' Modified Paths: -------------- trunk/extractor/extractor.c Modified: trunk/extractor/extractor.c =================================================================== --- trunk/extractor/extractor.c 2008-02-22 22:00:04 UTC (rev 57) +++ trunk/extractor/extractor.c 2008-02-22 22:05:39 UTC (rev 58) @@ -69,6 +69,7 @@ static void extract_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { char *fname; + char *good_slash, *slash; file_t *file; FILE *out; gtk_tree_model_get(model, iter, PTR_COL, &file, -1); @@ -76,6 +77,9 @@ strcpy(fname, data); strcat(fname, "/"); strcat(fname, file->name); + good_slash = fname + strlen(data); + while ((slash = strrchr(fname, '/')) > good_slash) + *slash = '_'; out = fopen(fname, "wb"); if (out) cur_fmt->extract_file(input_file, file, out); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |