From 0cd4fe01093b6a2ad949765a9a18333b73852ffc Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Tue, 31 Mar 2015 14:11:45 +0200 Subject: [PATCH] Use proper variable type for format attribute. DeviceIoControl with flag FSCTL_SET_COMPRESSION expect the format to be as unsigned short not integer which can be 32 or 64 bits depending on the compile. Switched this variable to uint16_t which should be an unsigned short. Fixes #436: Restore crash file daemon --- src/findlib/attribs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/findlib/attribs.c b/src/findlib/attribs.c index d6782629b74..6a5aa75935c 100644 --- a/src/findlib/attribs.c +++ b/src/findlib/attribs.c @@ -717,7 +717,7 @@ static bool set_win32_attributes(JCR *jcr, ATTR *attr, BFILE *ofd) * Restore the compressed file attribute on the restored file. */ if (atts.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED) { - int format = COMPRESSION_FORMAT_DEFAULT; + uint16_t format = COMPRESSION_FORMAT_DEFAULT; Dmsg1(100, "Restore FILE_ATTRIBUTE_COMPRESSED on %s\n", attr->ofname); DeviceIoControl(ofd->fh, FSCTL_SET_COMPRESSION, &format, sizeof(format), NULL, 0, NULL, NULL);