#412 metaflac doesn't always clean up temp file if interrupted

1.3.0
open
nobody
None
5
2014-03-27
2014-03-08
Jim Avera
No

If interrupted by a signal (e.g. from ^C), metaflac sometimes leaves a file behind named trackfile.metadata_edit .

Discussion

  • Erik
    Erik
    2014-03-21

    Can you please provide me with the full command line you are using as well?

     
  • Jim Avera
    Jim Avera
    2014-03-27

    It happens while adding tags. Playing around, I was able to reproduce the problem manually with the following command (run in a directory containing 13 .flac files):

    metaflac --set-tag='AAA=dummy' --set-tag='BBB=dummy' --set-tag='CCC=dummy' *.flac
    

    However it does not happen very often.

     
  • Jim Avera
    Jim Avera
    2014-03-27

    Here (attached) is a script which reproduces the problem. It repeatedly runs various metaflac commands and then interrupts them after a short random delay. On my system a xxx.metadata_edit file is left behind after about a minute or two. Sometimes other file corruptions occur.

    Ideally metaflac should catch signals and always clean up (and leave the .flac file in a non-corrupted state) before exiting.

     
    Attachments