#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 , 19 years ago
comment:2 by , 19 years ago
Status: | new → closed |
---|
comment:3 by , 19 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 , 19 years ago
Resolution: | → fixed |
---|
Note:
See TracTickets
for help on using tickets.
Could a new _kern_unlink_dir(int fd, const char *path) be ok ? Could _kern_unlink(int fd, const char *path) handle directories too ?