mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Fixed an endianness error in ntfscp
The file timestamp was not set according to CPU endianness.
This commit is contained in:
parent
facb697303
commit
006799ab80
@ -4,7 +4,7 @@
|
||||
* Copyright (c) 2004-2007 Yura Pakhuchiy
|
||||
* Copyright (c) 2005 Anton Altaparmakov
|
||||
* Copyright (c) 2006 Hil Liao
|
||||
* Copyright (c) 2014 Jean-Pierre Andre
|
||||
* Copyright (c) 2014-2019 Jean-Pierre Andre
|
||||
*
|
||||
* This utility will copy file to an NTFS volume.
|
||||
*
|
||||
@ -1153,8 +1153,9 @@ close_attr:
|
||||
ntfs_attr_close(na);
|
||||
if (opts.timestamp) {
|
||||
if (!fstat(fileno(in),&st)) {
|
||||
out->last_data_change_time = st.st_mtime*10000000LL
|
||||
s64 change_time = st.st_mtime*10000000LL
|
||||
+ NTFS_TIME_OFFSET;
|
||||
out->last_data_change_time = cpu_to_le64(change_time);
|
||||
ntfs_inode_update_times(out, 0);
|
||||
} else {
|
||||
ntfs_log_error("Failed to get the time stamp.\n");
|
||||
|
Loading…
Reference in New Issue
Block a user