diff options
Diffstat (limited to 'src/plugins/fs/upload.c')
-rw-r--r-- | src/plugins/fs/upload.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index 2e80c165..e8d91b2e 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -315,7 +315,7 @@ void on_fileInformationKeywordEntry_changed_fs(gpointer dummy2, | |||
315 | } | 315 | } |
316 | 316 | ||
317 | typedef struct { | 317 | typedef struct { |
318 | const char * filename; | 318 | char * filename; |
319 | unsigned int anonymity; | 319 | unsigned int anonymity; |
320 | unsigned int priority; | 320 | unsigned int priority; |
321 | int index; | 321 | int index; |
@@ -349,6 +349,7 @@ static void * start_upload_helper(void * cls) { | |||
349 | void on_fsinsertuploadbutton_clicked_fs(gpointer dummy, | 349 | void on_fsinsertuploadbutton_clicked_fs(gpointer dummy, |
350 | GtkWidget * uploadButton) { | 350 | GtkWidget * uploadButton) { |
351 | FSUC fsuc; | 351 | FSUC fsuc; |
352 | const char * filename; | ||
352 | const char * filenamerest; | 353 | const char * filenamerest; |
353 | GtkWidget * dialog; | 354 | GtkWidget * dialog; |
354 | EXTRACTOR_ExtractorList * extractors; | 355 | EXTRACTOR_ExtractorList * extractors; |
@@ -367,8 +368,8 @@ void on_fsinsertuploadbutton_clicked_fs(gpointer dummy, | |||
367 | extractors = EXTRACTOR_loadConfigLibraries(extractors, | 368 | extractors = EXTRACTOR_loadConfigLibraries(extractors, |
368 | config); | 369 | config); |
369 | FREE(config); | 370 | FREE(config); |
370 | fsuc.filename = getEntryLineValue(getMainXML(), | 371 | filename = getEntryLineValue(getMainXML(), |
371 | "uploadFilenameComboBoxEntry"); | 372 | "uploadFilenameComboBoxEntry"); |
372 | metaXML | 373 | metaXML |
373 | = glade_xml_new(getGladeFileName(), | 374 | = glade_xml_new(getGladeFileName(), |
374 | "metaDataDialog", | 375 | "metaDataDialog", |
@@ -379,11 +380,11 @@ void on_fsinsertuploadbutton_clicked_fs(gpointer dummy, | |||
379 | meta = ECRS_createMetaData(); | 380 | meta = ECRS_createMetaData(); |
380 | ECRS_extractMetaData(ectx, | 381 | ECRS_extractMetaData(ectx, |
381 | meta, | 382 | meta, |
382 | fsuc.filename, | 383 | filename, |
383 | extractors); | 384 | extractors); |
384 | EXTRACTOR_removeAll(extractors); | 385 | EXTRACTOR_removeAll(extractors); |
385 | filenamerest = &fsuc.filename[strlen(fsuc.filename)-1]; | 386 | filenamerest = &filename[strlen(filename)-1]; |
386 | while ( (filenamerest > fsuc.filename) && | 387 | while ( (filenamerest > filename) && |
387 | (filenamerest[-1] != DIR_SEPARATOR) ) | 388 | (filenamerest[-1] != DIR_SEPARATOR) ) |
388 | filenamerest--; | 389 | filenamerest--; |
389 | ECRS_addToMetaData(meta, | 390 | ECRS_addToMetaData(meta, |
@@ -437,8 +438,10 @@ void on_fsinsertuploadbutton_clicked_fs(gpointer dummy, | |||
437 | fsuc.gkeywordURI = ECRS_stringToUri(ectx, | 438 | fsuc.gkeywordURI = ECRS_stringToUri(ectx, |
438 | ECRS_URI_PREFIX | 439 | ECRS_URI_PREFIX |
439 | ECRS_SEARCH_INFIX); | 440 | ECRS_SEARCH_INFIX); |
441 | fsuc.filename = STRDUP(filename); | ||
440 | run_with_save_calls(&start_upload_helper, | 442 | run_with_save_calls(&start_upload_helper, |
441 | &fsuc); | 443 | &fsuc); |
444 | FREE(fsuc.filename); | ||
442 | ECRS_freeMetaData(fsuc.meta); | 445 | ECRS_freeMetaData(fsuc.meta); |
443 | ECRS_freeUri(fsuc.gkeywordURI); | 446 | ECRS_freeUri(fsuc.gkeywordURI); |
444 | ECRS_freeUri(fsuc.keywordURI); | 447 | ECRS_freeUri(fsuc.keywordURI); |
@@ -529,8 +532,6 @@ void on_mainFileSharingInsertBrowseButton_clicked_fs(GtkWidget * browseButton, | |||
529 | free(filename); | 532 | free(filename); |
530 | } | 533 | } |
531 | 534 | ||
532 | /* FIXME: handlers for clear and stop! */ | ||
533 | |||
534 | struct FCBC { | 535 | struct FCBC { |
535 | int (*method)(struct FSUI_Context * ctx, | 536 | int (*method)(struct FSUI_Context * ctx, |
536 | struct FSUI_UploadList * list); | 537 | struct FSUI_UploadList * list); |