]> diplodocus.org Git - minc/commit
use Errno and Fcntl qw(O_WRONLY O_EXCL O_CREAT) .
authorepg <>
Sat, 31 Aug 2002 18:44:47 +0000 (18:44 +0000)
committerepg <>
Sat, 31 Aug 2002 18:44:47 +0000 (18:44 +0000)
commit560f85f023d93fe441ec74c8c4b6fb1725455f68
tree8f0bdab805664a06d41c6200e1f9c85c8205429e
parent8c17dd45abccc80141879f231e71f0b77bc8dc9c
use Errno and Fcntl qw(O_WRONLY O_EXCL O_CREAT) .

(get_highest_msgnum): Restructure to step through readdir itself
rather than go through getfiles, since we don't want full path names
like that returns, but only the base filenames readdir returns.  Also
fix it to return the highest number in the folder, not that number
plus one, making its name accurate.

(store_message): Adapt to get_highest_msgnum returning only the
highest message number.  Use better $! test.  Only create the empty
message file with sysopen when not $run.  Use the full filename in the
error message when we couldn't find a new filename.
minc