What platform are you on?
On Windows when dealing with shared filesystems I have
been burned enough that I routinely make sure that I have
waited a substantial time (eg one second) between when I
closed a file and when I do anything which depends on my
write being visible to the world. Why this should be
necessary I do not know, but then again I likewise don't
bother to remember the exact combination of versions of
Perl and Windows in which renaming a file from FOO to foo
will delete the file because it does not realize that the
target is the original file. (So delete the existing, then
go to ren...oops.)
I merely know that I was burned and the absolutely safe
fixes were to sleep in the one case or in the other to
rename into another directory and then rename back.
(Contrary to Microsoft's documentation on the bug,
renaming through another name in the same directory was
not safe.)
Anyways it is possible that you are hitting bugs... |