From: Eric Biggers Date: Fri, 9 May 2014 15:16:10 +0000 (-0500) Subject: Remove canonicalize_fs_path() X-Git-Tag: v1.7.0~221 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=8fdd844dd0fe0f21948fc4e416b0c939d94566de Remove canonicalize_fs_path() --- diff --git a/include/wimlib/paths.h b/include/wimlib/paths.h index bad8e74c..58a86fe4 100644 --- a/include/wimlib/paths.h +++ b/include/wimlib/paths.h @@ -19,7 +19,4 @@ do_canonicalize_path(const tchar *in, tchar *out); extern tchar * canonicalize_wim_path(const tchar *wim_path) _malloc_attribute; -extern tchar * -canonicalize_fs_path(const tchar *fs_path) _malloc_attribute; - #endif /* _WIMLIB_PATHS_H */ diff --git a/src/paths.c b/src/paths.c index 62347c9f..db0b6827 100644 --- a/src/paths.c +++ b/src/paths.c @@ -74,15 +74,6 @@ path_stream_name(const tchar *path) return stream_name + 1; } -/* Duplicate a path; return empty string for NULL input. */ -tchar * -canonicalize_fs_path(const tchar *fs_path) -{ - if (fs_path == NULL) - fs_path = T(""); - return TSTRDUP(fs_path); -} - /* Collapse and translate path separators, and strip trailing slashes. Doesn't * add or delete a leading slash. * diff --git a/src/update_image.c b/src/update_image.c index a2589f0c..a009dc6f 100644 --- a/src/update_image.c +++ b/src/update_image.c @@ -1403,7 +1403,7 @@ copy_update_commands(const struct wimlib_update_command *cmds, switch (cmds[i].op) { case WIMLIB_UPDATE_OP_ADD: cmds_copy[i].add.fs_source_path = - canonicalize_fs_path(cmds[i].add.fs_source_path); + TSTRDUP(cmds[i].add.fs_source_path); cmds_copy[i].add.wim_target_path = canonicalize_wim_path(cmds[i].add.wim_target_path); if (!cmds_copy[i].add.fs_source_path ||