Skip to content

Commit

Permalink
Use proper variable type for format attribute.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Marco van Wieringen committed May 9, 2015
1 parent bb6beb1 commit 0cd4fe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/findlib/attribs.c
Expand Up @@ -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);
Expand Down

0 comments on commit 0cd4fe0

Please sign in to comment.