Bug #59

Failing when creating new local folders

Added by White Magic 257 days ago. Updated 257 days ago.

Status :Closed Start :03/21/2008
Priority :Normal Due date :
Assigned to :John Goerzen % Done :

0%

Category :Maildir
Target version :5.99.8
Resolution :

Fixed


Description

Offlineimap fails when creating multiple not yet existing folders to store its data:

@Thread 'Account sync ACCOUNTNAME' terminated with exception:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/offlineimap/threadutil.py", line 153, in run
Thread.run(self)
File "/usr/lib/python2.5/threading.py", line 446, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.5/site-packages/offlineimap/accounts.py", line 114, in syncrunner
self.sync()
File "/usr/lib/python2.5/site-packages/offlineimap/accounts.py", line 148, in sync
remoterepos.syncfoldersto(localrepos, [statusrepos])
File "/usr/lib/python2.5/site-packages/offlineimap/repository/Base.py", line 157, in syncfoldersto
copyfolder.makefolder(key)
File "/usr/lib/python2.5/site-packages/offlineimap/repository/LocalStatus.py", line 47, in makefolder
os.unlink(filename)
OSError: [Errno 2] No such file or directory: '/home/USER/.offlineimap/Account-ACCOUTNAME/LocalStatus/FOLDER_NAME'@

This error occurs because "os.unlink(filename)" tries to remove a folder which does not yet exist and thus fails with the above exception. Removing the call to "os.unlink()" fixes the problem. But I don't know if this might cause some other problems. If so it would be a matter of adding a check wether the folder to remove exists or not.

As someone said here http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/fdb4fa23d1d6e417 simply rerunning offlineimap after each exception works as the offending folder has been created by then seemingly.

History

03/21/2008 06:12 AM - White Magic

I just found out that I had an older version (5.99.7) of offlineimap and had a look at 5.99.8 and the bug is fixed there.

03/21/2008 08:28 AM - John Goerzen

  • Target version set to 5.99.8
  • Assigned to set to John Goerzen
  • Status changed from New to Closed

Thank you for the update. I will therefore close the bug.

Also available in: Atom PDF