Menu

#1517 Taskcoach tries to create already existing file when saving

Release_1.3.38
fixed-and-released
None
windows
1
2014-05-18
2014-05-15
No

This error occurred yesterday when trying to save(update) my TaskCoach file.

Translation for the German sentence: "A file can not be created when it already exists."

The file already exists for years and I never had a problem saving to it.

============= Wed May 14 10:59:50 2014
Traceback (most recent call last):
File "taskcoachlib\persistence\autosaver.pyo", line 56, in on_idle
File "taskcoachlib\persistence\taskfile.pyo", line 461, in save
File "taskcoachlib\persistence\taskfile.pyo", line 347, in save
File "taskcoachlib\persistence\taskfile.pyo", line 49, in close
WindowsError: [Error 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist

Discussion

  • Jérome Laheurte

    Looks like a temp file stayed around from a previous failed save. I'll add a check for this.

     
    • Florian George

      Florian George - 2014-05-17

      That might be true, when I looked into the directory a day later, there were some temp files in there, I don't exactly remember the naming, it was something like Tmp.1 Tmp.2 Tmp.3 Tmp.4 Tmp.5, and the timestamps were from when the error occurred.

       
  • Jérome Laheurte

    • assigned_to: Jérome Laheurte
     
  • Jérome Laheurte

    Just to explain, Task Coach saves its file in two steps:

    1. Actually save to a .tmp.XX file
    2. If no error occurred, delete the actual task file and rename the .tmp.XX

    This way the save is "atomic" and we don't lose the previous file if an exceptional condition occurs (disk full, for instance).

    In your case it looks like the deletion of the task file failed silently, and we tried to go on renaming. I cannot even start to imagine how this could happen. Is it located in a "special" folder (Dropbox, Google Drive) ?

     
    • Florian George

      Florian George - 2014-05-17

      It is located on a mounted TrueCrypt volume, which itself sits on an external SSD. Every few months, a random file operation fails, so that might have happened.

       
  • Jérome Laheurte

    Seems awfully frequent if you have several .tmp files though... I added a check and try to rename the existing file if it still exists after deleting it. Hope this will make things better.

     
  • Jérome Laheurte

    This bug should be fixed in the latest release of Task Coach. Can you please install the latest release of Task Coach and confirm that this bug has indeed been fixed?

    Thanks, Task Coach development team

     

Log in to post a comment.