mufs: get parent directory in mufs_rmpath() to remove the directory entry from

tags/0.1.0
S.J.R. van Schaik 7 years ago
parent 6492a76d14
commit 704cd24061
  1. 5
      source/fs/mufs/path.c

@ -96,12 +96,15 @@ int mufs_rmpath(struct mufs *fs, const char *path)
char data[1 << dev->log2_block_size];
struct mufs_dentry *entry, *next;
struct mufs_tree *tree;
char *s;
char *s, *name;
uint32_t va, offset, len;
if (!(s = mufs_abspath(path)))
return -1;
name = strrchr(s, '/');
*name++ = '\0';
if (!(tree = resolve_path(fs, s, NULL))) {
free(s);
return -1;

Loading…
Cancel
Save