X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fextract_image.c;h=3d7fd36c6cb6736ee470607e99dbac82042767f4;hp=6735602f495d489a545598bddd85a3efe6060265;hb=f389abff995f590fd762777e302f99a413521765;hpb=a381a9e10a60c7790fe33255c949bf55b5872a8d diff --git a/src/extract_image.c b/src/extract_image.c index 6735602f..3d7fd36c 100644 --- a/src/extract_image.c +++ b/src/extract_image.c @@ -2,11 +2,6 @@ * extract_image.c * * Support for extracting WIM files. - * - * This code does NOT contain any filesystem-specific features. In particular, - * security information (i.e. file permissions) and alternate data streams are - * ignored, except possibly to read an alternate data stream that contains - * symbolic link data. */ /* @@ -31,30 +26,30 @@ #include "config.h" #if defined(__CYGWIN__) || defined(__WIN32__) -#include -#ifdef ERROR -#undef ERROR -#endif -#include +# include +# ifdef ERROR +# undef ERROR +# endif +# include +#else +# include +# ifdef HAVE_UTIME_H +# include +# endif +# include "timestamp.h" +# include #endif -#include #include #include +#include #include #include -#include -#include - -#ifdef HAVE_UTIME_H -#include -#endif #include #include "dentry.h" #include "lookup_table.h" -#include "timestamp.h" #include "wimlib_internal.h" #include "xml.h" @@ -64,8 +59,6 @@ #ifdef HAVE_ALLOCA_H #include -#else -#include #endif #if defined(__CYGWIN__) || defined(__WIN32__) @@ -350,7 +343,7 @@ static int win32_set_security_data(const struct wim_inode *inode, return 0; } -#else +#else /* __CYGWIN__ || __WIN32__ */ static int extract_regular_file_linked(struct wim_dentry *dentry, const char *output_path, struct apply_args *args, @@ -619,7 +612,7 @@ static int extract_symlink(struct wim_dentry *dentry, return 0; } -#endif /* !__CYGWIN__ && !__WIN32__ */ +#endif /* !(__CYGWIN__ || __WIN32__) */ static int extract_directory(struct wim_dentry *dentry, const char *output_path, bool is_root) @@ -785,8 +778,11 @@ static int apply_dentry_timestamps_normal(struct wim_dentry *dentry, void *arg) return ret; DEBUG("Opening \"%ls\" to set timestamps", utf16_path); - h = CreateFileW(utf16_path, GENERIC_WRITE, FILE_SHARE_READ, - NULL, OPEN_EXISTING, + h = CreateFileW((const wchar_t*)utf16_path, + GENERIC_WRITE, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL);