Wireshark-bugs: [Wireshark-bugs] [Bug 6362] Export -> Object -> HTTP -> save all: Error on savin
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6362
DeCount <aatrade@xxxxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #9 from DeCount <aatrade@xxxxxxxxx> 2011-09-21 01:59:59 PDT ---
I have tested right now the fix. But this not working correctly when the number
of the message to export, with the same file name, is more than the limit that
is set, now is 1000.
In this case for each message that exceed 1000 the following message appear:
"The file "<Path>/RPC3_(999)could not be created: File exist.".
If the file contains 1500 http message to export, the user must manually close
500 alert pop-up! I think that this is not acceptable.
The minimal fix to avoid the problem that I have found is the following (this
was the reason of the "if" already inserted on my patch sent yesterday):
NOTE: The diff was done against the file "./gtk/export_object.c" on revision
r39061:
333c333,334
< if ( count == 1000 ) {
---
> count = 0;
> if (!eo_save_entry(save_as_fullpath, entry, TRUE))
335,340d335
< }
< else {
< count = 0;
< if (!eo_save_entry(save_as_fullpath, entry, TRUE))
< all_saved = FALSE;
< }
In this case the user don't know the reason because the file are not more saved
(limit of 1000 file reached).
If we want inform the user about the reason of the fault, the code to add
should be something like this:
310d309
< gboolean less_saved = TRUE;
334,341c333,335
< if ( count == 1000 ) {
< less_saved = FALSE;
< }
< else {
< count = 0;
< if (!eo_save_entry(save_as_fullpath, entry, TRUE))
< all_saved = FALSE;
< }
---
> count = 0;
> if (!eo_save_entry(save_as_fullpath, entry, TRUE))
> all_saved = FALSE;
350c344
< if (!all_saved && !less_saved)
---
> if (!all_saved)
352,360c346,347
< "Reached max files to save (1000).\nSome files could not be
saved.");
< else {
< if (!less_saved)
< simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
< "Reached max files to save (1000).");
< if (!all_saved)
< simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
< "Some files could not be saved.");
< }
---
> "Some files could not be saved.");
>
I think that the minimal fix, reported above, should be enough.
Solve how you think better.
All the code present above was tested and seems that working correctly.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.