Menu

#107 .XXXXXX files being left behind

open-works-for-me
None
5
2003-03-02
2002-10-19
Spoon
No

In Windows when updating a id3v2 tag (one after the
other really quick, in same file) it leaves the
original .mp3 file and a .mp3.XXXXXX

I have had to add in this bit of code after writing the tag
for now:

SaveThisID3v2TagElement(szFileName,
Element, TagValue);
//-------bug fix for ID3lib
that does not remove .XXXXXX file--
char XXX[MAX_PATH];
strcpy(XXX,
szFileName);
strcat(XXX, ".XXXXXX");
if
(SPaths::DoesFileExist(XXX))
{
if
(SPaths::DoesFileExist(szFileName))
{

DWORD Entry = GetTickCount();

while (!DeleteFile(szFileName))
{

Sleep(100);

if (GetTickCount() - Entry > 4000)

break;
}
}
DWORD
Entry = GetTickCount();
while (!
MoveFile(XXX, szFileName))
{

Sleep(100);

if (GetTickCount() - Entry > 4000)

break;
}
}

Discussion

  • T.H.F. Klok

    T.H.F. Klok - 2002-10-21

    Logged In: YES
    user_id=564388

    Does it reach the line "rename(sTempFile, filename.c_str());"

     
  • T.H.F. Klok

    T.H.F. Klok - 2002-10-26
    • assigned_to: nobody --> t1mpy
     
  • Spoon

    Spoon - 2002-10-27

    Logged In: YES
    user_id=350722

    I didn't get change to delve too much into it. I was using an
    earlier version of ID3Lib, I updated to the latest and there was
    the problem.

    Sorry for the vague answer...

     
  • Spoon

    Spoon - 2002-11-01

    Logged In: YES
    user_id=350722

    It might be down to how I write the tags, they are written one
    item at a time, so:

    Tag is Opened..Artist is written...Tag is Closed...Tag is
    Opened...Album is written...Tag is Closed.

     
  • T.H.F. Klok

    T.H.F. Klok - 2003-03-02
    • status: open --> open-works-for-me
     
  • T.H.F. Klok

    T.H.F. Klok - 2003-03-02

    Logged In: YES
    user_id=564388

    I couldn't reproduce this, does it happen all the time or just
    sometimes?

     

Log in to post a comment.