]> wimlib.net Git - wimlib/blobdiff - src/extract_image.c
Replace rename()
[wimlib] / src / extract_image.c
index 199d20b27ee50362959aa1062e29130e39a40aef..963f40c751e84c6a29fe35ca8b12310c335218e2 100644 (file)
@@ -922,13 +922,14 @@ extract_all_images(WIMStruct *w, const mbchar *target,
 
 /* Extracts a single image or all images from a WIM file to a directory or NTFS
  * volume. */
-WIMLIBAPI int wimlib_extract_image(WIMStruct *w,
-                                  int image,
-                                  const char *target,
-                                  int extract_flags,
-                                  WIMStruct **additional_swms,
-                                  unsigned num_additional_swms,
-                                  wimlib_progress_func_t progress_func)
+WIMLIBAPI int
+wimlib_extract_image(WIMStruct *w,
+                    int image,
+                    const mbchar *target,
+                    int extract_flags,
+                    WIMStruct **additional_swms,
+                    unsigned num_additional_swms,
+                    wimlib_progress_func_t progress_func)
 {
        struct wim_lookup_table *joined_tab, *w_tab_save;
        int ret;
@@ -989,9 +990,6 @@ WIMLIBAPI int wimlib_extract_image(WIMStruct *w,
                w->lookup_table = joined_tab;
        }
 
-#ifdef __WIN32__
-       win32_acquire_restore_privileges();
-#endif
        if (image == WIMLIB_ALL_IMAGES) {
                extract_flags |= WIMLIB_EXTRACT_FLAG_MULTI_IMAGE;
                ret = extract_all_images(w, target, extract_flags,
@@ -1001,9 +999,6 @@ WIMLIBAPI int wimlib_extract_image(WIMStruct *w,
                ret = extract_single_image(w, image, target, extract_flags,
                                           progress_func);
        }
-#ifdef __WIN32__
-       win32_release_restore_privileges();
-#endif
 
        if (extract_flags & (WIMLIB_EXTRACT_FLAG_SYMLINK |
                             WIMLIB_EXTRACT_FLAG_HARDLINK))