]> wimlib.net Git - wimlib/commitdiff
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 bad8e74c0c41862ba85b702914cfa48288741368..58a86fe40b40a6416057b970f059e426e357f516 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_wim_path(const tchar *wim_path) _malloc_attribute;
 
-extern tchar *
-canonicalize_fs_path(const tchar *fs_path) _malloc_attribute;
-
 #endif /* _WIMLIB_PATHS_H */
 #endif /* _WIMLIB_PATHS_H */
index 62347c9fbd25027aec8ad183208e1941ebb85792..db0b68275a8e35d8de137204721ad4b05d343fde 100644 (file)
@@ -74,15 +74,6 @@ path_stream_name(const tchar *path)
                return stream_name + 1;
 }
 
                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.
  *
 /* Collapse and translate path separators, and strip trailing slashes.  Doesn't
  * add or delete a leading slash.
  *
index a2589f0cfe2325149f91a4f6ac9653f1b935991e..a009dc6fc684863a4d35eec5d245618d4e118e44 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 =
                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 ||
                        cmds_copy[i].add.wim_target_path =
                                canonicalize_wim_path(cmds[i].add.wim_target_path);
                        if (!cmds_copy[i].add.fs_source_path ||