Subject: | Lock files should be stored internally using full pathnames |
If I open a mailbox, create a lock, change directory and close the mailbox, the lock will not be erased - probably the lock filename should be stored with the complete path? Take for example the output from the snippet I am attaching:
gwolf@lactop:/tmp$ mkdir dir1
gwolf@lactop:/tmp$ mkdir dir2
gwolf@lactop:/tmp$ touch dir1/mbox
gwolf@lactop:/tmp$ perl lockpathbug.pl
Couldn't remove lockfile a_lock: No such file or directory
gwolf@lactop:/tmp$ ls dir1
a_lock mbox
Just for reference, this bug report was filed in reply to bug #321085 in the Debian bug tracking system: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=321085
#!/usr/bin/perl
use Mail::Box::Manager
chdir('/tmp/dir1');
$mgr = Mail::Box::Manager->new;
$folder = $mgr->open(folder => 'mbox', access=>'rw', lock_file => 'a_lock',
lock_type => 'Multi');
chdir('/tmp/dir2');
$folder->close;