mufs: fix syncing issue in write_dirent()

tags/0.1.0
S.J.R. van Schaik 8 years ago
parent cbd395e137
commit 0e9c19c836
  1. 4
      source/fs/mufs/dir.c

@ -293,8 +293,8 @@ size_t write_dirent(struct mufs_tree *tree,
if (mufs_tree_write(tree, &entry, va + offset, sizeof entry) == 0)
return 0;
tree->file_size = max(tree->file_size, va + offset + sizeof entry +
entry.path_len);
va += offset + sizeof entry + entry.path_len;
tree->file_size = max(tree->file_size, va);
if (tree->file_size <= va && mufs_sync_tree(tree) < 0)
return 0;

Loading…
Cancel
Save