* Build depend on quilt, use dh --with quilt.
* Add debian/patches/fix-fuse-read-write-return-r336.patch
Fixes "Operation not permitted" error reporting on empty files.
+ * Add debian/patches/fix-unexpected-removal-on-dir-move-r337.patch
+ Fixes unexpected removal of a directory if you move it into itself.
-- Sven Hoexter <hoexter@debian.org> Fri, 25 Jan 2013 21:53:16 +0100
--- /dev/null
+Fixed unexpected removal of a directory if it is moved into itself: return
+EINVAL in this situation. It also happens when trying to change directory name
+case.
+Picked from upstream svn r337.
+Index: libexfat/node.c
+===================================================================
+--- libexfat/node.c.orig 2013-01-25 22:09:06.197124362 +0100
++++ libexfat/node.c 2013-01-25 22:11:41.273118704 +0100
+@@ -905,6 +905,23 @@
+ 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 */