[KinoSearch] Error in function kino_FSFolder_delete_file
Marvin Humphrey
marvin at rectangular.com
Tue Sep 4 09:31:49 PDT 2007
On Sep 4, 2007, at 2:17 AM, Henka wrote:
> You're probably aware of this error in the current subversion:
No, I hadn't been.
> Error in function kino_FSFolder_delete_file at
> ../c_src/KinoSearch/Store/FSFolder.c:164: Couldn't remove file
> '/usr/share/locale/en_US/LC_MESSAGES/libc.mo': No such file or
> directory
> OR:
>
> Error in function kino_FSFolder_delete_file at
> ../c_src/KinoSearch/Store/FSFolder.c:164: Couldn't remove file '0': No
> such file or directory
The error message is messed up. Those aren't the actual files KS is
trying to delete. I used the wrong ByteBuf string pointer; it's
pointing to memory that was freed the line before.
void
FSFolder_delete_file(FSFolder *self, const ByteBuf *filename)
{
ByteBuf *path = full_path(self, filename);
if ( remove(path->ptr) ) {
REFCOUNT_DEC(path);
CONFESS("Couldn't remove file '%s': %s", path->ptr,
strerror(errno));
}
else {
REFCOUNT_DEC(path);
}
}
The message appears to be complete garbage because if it had been
freed-but-still-correct, path->ptr would have started with the
FSFolder object's directory name, which is an absolute path.
I've fixed the error message as of repository revision 2505. I would
be curious to know what the actual files are.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
More information about the kinosearch
mailing list