EDDiscovery / EliteDangerousCore

Elite Dangerous specific submodule
Apache License 2.0
2 stars 18 forks source link

Small log issue when converting+deleting screenshots #115

Closed SabreML closed 1 year ago

SabreML commented 1 year ago

If the screenshot conversion settings are set to delete the original .bmp file after converting it, the program log entry for the conversion will have an empty space where the deleted file name should be:

Capture (This should instead be 'Converted X to Y')


Based on a quick look at the code, the problem seems to be line 248 at the end of the Convert() method here: https://github.com/EDDiscovery/EliteDangerousCore/blob/87f42036cb47fb5e0d86add01dd75a2f553fd3ec/EliteDangerous/Screenshots/ScreenShotImageConverter.cs#L246-L250 Path.GetFileName(inputfilename) is returning null, presumably because the file at inputfilename's location has been deleted, so the log entry gets an empty space added to it rather than a file path.

This seems like an easy "bug" to fix, but I don't know anything about the codebase so I figured I'd post an issue about it rather than messing something up myself.

robbyxp1 commented 1 year ago

Thank you - finally fixed it. In devEDSM.