OSDN Git Service

Update parent directory mtime when file is removed.
authorrelan <relan@users.noreply.github.com>
Fri, 8 Jan 2010 08:54:32 +0000 (08:54 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:11 +0000 (08:26 +0300)
libexfat/node.c

index 5696dba..9777bb5 100644 (file)
@@ -505,6 +505,10 @@ static void erase_entry(struct exfat* ef, struct exfat_node* node)
 static void delete(struct exfat* ef, struct exfat_node* node)
 {
        erase_entry(ef, node);
+
+       node->parent->mtime = time(NULL);
+       node->parent->flags |= EXFAT_ATTRIB_DIRTY;
+
        if (node->prev)
                node->prev->next = node->next;
        else /* this is the first node in the list */