Avoided double opening of parent directory name in ntfscp

Double openings of a file or directory lead to double memory copies and
may lead to inconsistencies. On such situation could occur in ntfscp.
edge.strict_endians
Jean-Pierre André 2014-03-11 09:50:02 +01:00
parent 1d2fc42593
commit 7e38a29656
1 changed files with 1 additions and 1 deletions

View File

@ -984,7 +984,7 @@ int main(int argc, char *argv[])
strcat(overwrite_filename, "/");
}
strcat(overwrite_filename, filename);
ni = ntfs_pathname_to_inode(vol, NULL, overwrite_filename);
ni = ntfs_pathname_to_inode(vol, dir_ni, overwrite_filename);
/* Does a file with the same name exist in the dest dir? */
if (ni) {
ntfs_log_verbose("Destination path has a file with "