+1.0.1 (2013-02-02)
+
+* Fixed unexpected removal of a directory if it is moved into itself.
+* Fixed "Operation not permitted" error on reading an empty file.
+
1.0.0 (2013-01-19)
* Fixed crash when renaming a file within a single directory and a new name
}
if (!ef->ro && !ef->noatime)
exfat_update_atime(node);
- return size - remainder;
+ return MIN(size, node->size - offset) - remainder;
}
ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node,
exfat_put_node(ef, node);
return rc;
}
+
+ /* check that target is not a subdirectory of the source */
+ if (node->flags & EXFAT_ATTRIB_DIR)
+ {
+ struct exfat_node* p;
+
+ for (p = dir; p; p = p->parent)
+ if (node == p)
+ {
+ if (existing != NULL)
+ exfat_put_node(ef, existing);
+ exfat_put_node(ef, dir);
+ exfat_put_node(ef, node);
+ return -EINVAL;
+ }
+ }
+
if (existing != NULL)
{
/* remove target if it's not the same node as source */
#define EXFAT_VERSION_MAJOR 1
#define EXFAT_VERSION_MINOR 0
-#define EXFAT_VERSION_PATCH 0
+#define EXFAT_VERSION_PATCH 1
#endif /* ifndef VERSION_H_INCLUDED */