time4tea / gopro-dashboard-overlay

Programs to process GoPro MP4 & Generic GPX/FIT files and create video dashboards & maps
GNU General Public License v3.0
365 stars 51 forks source link

cleanup temporary files #135

Closed blshkv closed 1 year ago

blshkv commented 1 year ago

version 0.92.0 after running the following command: gopro-dashboard.py --video-time-end file-modified --use-gpx-only --gpx ./Afternoon_Ride.gpx --layout-xml ./layout.xml ./20230614175306_00822.MP4 ./20230614175306_00822_out2.MP4 it were the following two files left over in my system: /tmp/{tmpqaxw5ryg, tmpt2f2c4es}

Please make sure that all temporary files are removed

time4tea commented 1 year ago

Hi. Thanks for using the software and taking time to report a defect. This is not a priority.

blshkv commented 1 year ago

https://github.com/time4tea/gopro-dashboard-overlay/blob/main/gopro_overlay/common.py#L24

Python tempfile

mkstemp() and mkdtemp are lower-level functions which require manual cleanup.

So basically you either need to use a high level function (with delete=True option), or add a specific code to delete the file.