Skip Menu |
 

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 14342
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: gwolf [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.061
Fixed in: (no value)

Attachments


Subject: Lock files should be stored internally using full pathnames
Download (untitled) / with headers
text/plain 631b
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
Download lockpathbug.pl
text/x-perl 337b
#!/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;
Download (untitled) / with headers
text/plain 468b
On Sat Aug 27 14:41:36 2005, GWOLF wrote: Show quoted text
> 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:
Hi Mark, I noticed you have closed this bug. Could you please comment a bit? Do you consider this not a bug, or can't you reproduce it? Cheers, -- Niko Tyni ntyni@iki.fi
Download (untitled) / with headers
text/plain 344b
My comment somewhere lost? Anyway.... The default lock-filename is based on the folder filename. So: you could also complain about that not being converted into an absolute filename. For any application: if you are doing a chdir you are into trouble. My advice: if chdir hurts, than don't do it! (Or use absolute paths for the foldername)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.