Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#97 closed bug (fixed)

BEntry::Remove() doesn't handle directory entries

Reported by: korli Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

When calling BEntry::Remove() on a directory, I get a B_IS_A_DIRECTORY error.

BEntry::Remove() should call BStatable::IsDirectory() to know if the entry is a directory. If no, it should keep calling _kern_unlink() If yes, it should use a kernel call like _kern_remove_dir() but with appropriate parameters (fd + name instead of path).

I assigned to axeld, because of this kernel call issue.

Change History (5)

comment:1 Changed 13 years ago by korli

Could a new _kern_unlink_dir(int fd, const char *path) be ok ? Could _kern_unlink(int fd, const char *path) handle directories too ?

comment:2 Changed 13 years ago by axeld

Status: newclosed

comment:3 Changed 13 years ago by axeld

There already was a _kern_remove_dir() for directories. I've extended it to accept FD relative paths as well, and it's now called from BEntry::Remove() for directories. IOW should be fixed with hrev16078.

comment:4 Changed 13 years ago by axeld

Resolution: fixed

comment:5 Changed 13 years ago by korli

tested ok, thanks

Note: See TracTickets for help on using tickets.