Crash when 'Keep duplicate files in your file list' is disabled and a small shared file is renamed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Fix Released
|
High
|
Unassigned |
Bug Description
To reproduce I need to
- Share a file smaller than 1MiB
- Disable 'Keep duplicate files in your file list'
- Rename the file in your share
- Refresh filelist
The problem is that for some reason the newly found (renamed) file is considered as a dupe. The call for the real path of the nonexistent dupe file (needed for the LogManager message) throws an exception which is unhandled in ShareManager:
After some debugging I am still not sure though why it happens only with smaller files. I didn't tested with exact 1MiB file but it happens with ~900KiB and smaller files but not with an 1070KiB one and bigger...
The attached patch is a possible solution but it may does not fix the root of the problem....
Changed in dcplusplus: | |
status: | Confirmed → Fix Committed |
security vulnerability: | no → yes |
visibility: | public → private |
security vulnerability: | yes → no |
visibility: | private → public |
Okay, didn't happen first time i tried it, but after multiple renames, refreshed, and changing that setting, it crashed.
And now it crashes every time i try to open it.
Debug build, rev 1755.
Thrown: ShareException: File Not Available ShareException'
terminate called after throwing an instance of 'dcpp::
what(): ShareException: File Not Available
Adding new directory test