X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwim.c;h=70e8e73bcfde117136bf56aa8f5f75781a145b26;hp=1ffc3fef442dccb5e0760bcd28db5f3cbbd99a31;hb=406df77b8a9c2bb3318cf7737702eac27041e41e;hpb=cc1b289394f993fa1a75b845553eea44e85e5051 diff --git a/src/wim.c b/src/wim.c index 1ffc3fef..70e8e73b 100644 --- a/src/wim.c +++ b/src/wim.c @@ -25,58 +25,28 @@ #include "config.h" -#ifdef __WIN32__ -# include -# ifdef ERROR -# undef ERROR -# endif -#endif - +#include +#include #include -#include #include -#include - -#include "dentry.h" +#include #include -#include #ifdef WITH_NTFS_3G -#include -#include +# include +# include +#endif + +#ifdef __WIN32__ +# include "win32.h" #endif -#include "wimlib_internal.h" #include "buffer_io.h" +#include "dentry.h" #include "lookup_table.h" +#include "wimlib_internal.h" #include "xml.h" -#ifdef __WIN32__ -static char *realpath(const char *path, char *resolved_path) -{ - DWORD ret; - wimlib_assert(resolved_path == NULL); - - ret = GetFullPathNameA(path, 0, NULL, NULL); - if (!ret) - goto fail_win32; - - resolved_path = MALLOC(ret + 1); - if (!resolved_path) - goto fail; - ret = GetFullPathNameA(path, ret, resolved_path, NULL); - if (!ret) { - free(resolved_path); - goto fail_win32; - } - return resolved_path; -fail_win32: - win32_error(GetLastError()); -fail: - return NULL; -} -#endif - static int image_print_metadata(WIMStruct *w) { DEBUG("Printing metadata for image %d", w->current_image);