Browse Source

Fixed cast of FILETIME to FileTimePortable by elem by elem copy

master
suhrke 3 years ago
parent
commit
0668f866b5
2 changed files with 13 additions and 5 deletions
  1. 1
    1
      src/PortLibCpp
  2. 12
    4
      src/Printer.cpp

+ 1
- 1
src/PortLibCpp

@@ -1 +1 @@
Subproject commit 1f8a8426ac0fcf7163110f973f2d9e998b57535e
Subproject commit 6ea8f228493c1af34b9103df2a76df1ecdafd777

+ 12
- 4
src/Printer.cpp View File

@@ -193,10 +193,18 @@ static void Preparefiletoprint(t_printdata *print)
};
// Get time of last file modification.
GetFileTime (h, &created, &accessed, &modified);
if (modified.dwHighDateTime==0)
print->modified=(FileTimePortable)created;
else
print->modified=(FileTimePortable)modified;
if (modified.dwHighDateTime==0) {
FileTimePortable ftp;
ftp.dwLowDateTime = created.dwLowDateTime;
ftp.highDateTime = created.dwHighDateTime;
print->modified=ftp;
}
else {
FileTimePortable ftp;
ftp.dwLowDateTime = modified.dwLowDateTime;
ftp.highDateTime = modified.dwHighDateTime;
print->modified=ftp;
}
// Get original (uncompressed) file size.
print->origsize=GetFileSize (h, &l);
if (print->origsize==0 || print->origsize>MAXSIZE || l!=0) {

Loading…
Cancel
Save