Remove canonicalize_fs_path()
authorEric Biggers <ebiggers3@gmail.com>
Fri, 9 May 2014 15:16:10 +0000 (10:16 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 9 May 2014 15:16:10 +0000 (10:16 -0500)
include/wimlib/paths.h
src/paths.c
src/update_image.c

index bad8e74..58a86fe 100644 (file)
@@ -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 */
index 62347c9..db0b682 100644 (file)
@@ -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.
  *
index a2589f0..a009dc6 100644 (file)
@@ -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 ||