Opened 18 years ago

Closed 18 years ago

Last modified 18 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:
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 by korli, 18 years ago

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 by axeld, 18 years ago

Status: newclosed

comment:3 by axeld, 18 years ago

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 by axeld, 18 years ago

Resolution: fixed

comment:5 by korli, 18 years ago

tested ok, thanks

Note: See TracTickets for help on using tickets.