#ifdef __WIN32__
# include "imagex-win32.h"
-# define OS_PREFERRED_PATH_SEPARATOR L'\\'
-# define OS_PREFERRED_PATH_SEPARATOR_STRING L"\\"
# define print_security_descriptor win32_print_security_descriptor
#else /* __WIN32__ */
# include <getopt.h>
# include <langinfo.h>
-# define OS_PREFERRED_PATH_SEPARATOR '/'
-# define OS_PREFERRED_PATH_SEPARATOR_STRING "/"
# define print_security_descriptor default_print_security_descriptor
static inline void set_fd_to_binary_mode(int fd)
{
break;
case WIMLIB_PROGRESS_MSG_SCAN_BEGIN:
imagex_printf(T("Scanning \"%"TS"\""), info->scan.source);
- if (*info->scan.wim_target_path) {
- imagex_printf(T(" (loading as WIM path: "
- "\""WIMLIB_WIM_PATH_SEPARATOR_STRING"%"TS"\")...\n"),
- info->scan.wim_target_path);
- } else {
+ if (WIMLIB_IS_WIM_ROOT_PATH(info->scan.wim_target_path)) {
imagex_printf(T("\n"));
+ } else {
+ imagex_printf(T(" (loading as WIM path: \"%"TS"\")...\n"),
+ info->scan.wim_target_path);
}
memset(&last_scan_progress, 0, sizeof(last_scan_progress));
break;
T("NTFS volume") : T("directory")),
info->extract.target);
break;
- case WIMLIB_PROGRESS_MSG_EXTRACT_TREE_BEGIN:
- if (info->extract.extract_root_wim_source_path[0]) {
- imagex_printf(T("Extracting \"%"TS"\" from image %d "
- "(\"%"TS"\") in \"%"TS"\" to \"%"TS"\"\n"),
- info->extract.extract_root_wim_source_path,
- info->extract.image,
- info->extract.image_name,
- info->extract.wimfile_name,
- info->extract.target);
- }
- break;
case WIMLIB_PROGRESS_MSG_EXTRACT_STREAMS:
percent_done = TO_PERCENT(info->extract.completed_bytes,
info->extract.total_bytes);
}
break;
case WIMLIB_PROGRESS_MSG_APPLY_TIMESTAMPS:
- if (info->extract.extract_root_wim_source_path[0] == T('\0'))
- imagex_printf(T("Setting timestamps on all extracted files...\n"));
+ imagex_printf(T("Setting timestamps on all extracted files...\n"));
break;
case WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_END:
if (info->extract.extract_flags & WIMLIB_EXTRACT_FLAG_NTFS) {
case WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND:
switch (info->update.command->op) {
case WIMLIB_UPDATE_OP_DELETE:
- imagex_printf(T("Deleted WIM path "
- "\""WIMLIB_WIM_PATH_SEPARATOR_STRING "%"TS"\"\n"),
+ imagex_printf(T("Deleted WIM path \"%"TS"\"\n"),
info->update.command->delete_.wim_path);
break;
case WIMLIB_UPDATE_OP_RENAME:
- imagex_printf(T("Renamed WIM path "
- "\""WIMLIB_WIM_PATH_SEPARATOR_STRING "%"TS"\" => "
- "\""WIMLIB_WIM_PATH_SEPARATOR_STRING "%"TS"\"\n"),
+ imagex_printf(T("Renamed WIM path \"%"TS"\" => \"%"TS"\"\n"),
info->update.command->rename.wim_source_path,
info->update.command->rename.wim_target_path);
break;
/* Set up capture source in non-source-list mode. */
capture_sources = alloca(sizeof(struct wimlib_capture_source));
capture_sources[0].fs_source_path = source;
- capture_sources[0].wim_target_path = NULL;
+ capture_sources[0].wim_target_path = WIMLIB_WIM_ROOT_PATH;
capture_sources[0].reserved = 0;
num_sources = 1;
capture_sources_malloced = false;
WIMStruct *wim = NULL;
int image;
int ret;
- const tchar *path = T("");
+ const tchar *path = WIMLIB_WIM_ROOT_PATH;
int c;
struct print_dentry_options options = {
.detailed = false,
STRING_SET(refglobs);
- tchar *root_path = T("");
+ tchar *root_path = WIMLIB_WIM_ROOT_PATH;
for_opt(c, extract_options) {
switch (c) {