Cleaned object ids beyond the updated part

An earlier patch enabled updating a file proper id without changing
the other id (birth, volume, domain). However the first time the id
is set, these other ids have to be zeroed.
This commit is contained in:
Jean-Pierre André 2019-01-23 17:27:25 +01:00
parent 7a3ed93463
commit 96825f3c2b

View File

@ -3,7 +3,7 @@
*
* This module is part of ntfs-3g library
*
* Copyright (c) 2009-2017 Jean-Pierre Andre
* Copyright (c) 2009-2019 Jean-Pierre Andre
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@ -333,7 +333,7 @@ static int update_object_id(ntfs_inode *ni, ntfs_index_context *xo,
na = ntfs_attr_open(ni, AT_OBJECT_ID, AT_UNNAMED, 0);
if (na) {
memset(&old_attr, 0, sizeof(OBJECT_ID_ATTR));
/* remove the existing index entry */
oldsize = remove_object_id_index(na,xo,&old_attr);
if (oldsize < 0)