]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix a format parameter for a wide string in archive_write_disk_windows.c.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 20 Feb 2012 06:02:52 +0000 (15:02 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 20 Feb 2012 06:02:52 +0000 (15:02 +0900)
libarchive/archive_write_disk_windows.c

index ff561d90404e00d5b8eea84ad13f8e88c58ab2a3..39fd65fa0b8f2da7ab70039f4ed2b71d1a060bb5 100644 (file)
@@ -1420,7 +1420,7 @@ restore_entry(struct archive_write_disk *a)
 
        if (en) {
                /* Everything failed; give up here. */
-               archive_set_error(&a->archive, en, "Can't create '%s'",
+               archive_set_error(&a->archive, en, "Can't create '%ls'",
                    a->name);
                return (ARCHIVE_FAILED);
        }
@@ -1830,7 +1830,7 @@ check_symlinks(struct archive_write_disk *a)
                                 */
                                if (disk_unlink(a->name)) {
                                        archive_set_error(&a->archive, errno,
-                                           "Could not remove symlink %s",
+                                           "Could not remove symlink %ls",
                                            a->name);
                                        pn[0] = c;
                                        return (ARCHIVE_FAILED);
@@ -1844,7 +1844,7 @@ check_symlinks(struct archive_write_disk *a)
                                 */
                                if (!S_ISLNK(a->mode)) {
                                        archive_set_error(&a->archive, 0,
-                                           "Removing symlink %s",
+                                           "Removing symlink %ls",
                                            a->name);
                                }
                                /* Symlink gone.  No more problem! */
@@ -1855,14 +1855,14 @@ check_symlinks(struct archive_write_disk *a)
                                if (disk_unlink(a->name) != 0) {
                                        archive_set_error(&a->archive, 0,
                                            "Cannot remove intervening "
-                                           "symlink %s", a->name);
+                                           "symlink %ls", a->name);
                                        pn[0] = c;
                                        return (ARCHIVE_FAILED);
                                }
                                a->pst = NULL;
                        } else {
                                archive_set_error(&a->archive, 0,
-                                   "Cannot extract through symlink %s",
+                                   "Cannot extract through symlink %ls",
                                    a->name);
                                pn[0] = c;
                                return (ARCHIVE_FAILED);
@@ -2133,12 +2133,12 @@ create_dir(struct archive_write_disk *a, wchar_t *path)
                        return (ARCHIVE_OK);
                if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) {
                        archive_set_error(&a->archive, EEXIST,
-                           "Can't create directory '%s'", path);
+                           "Can't create directory '%ls'", path);
                        return (ARCHIVE_FAILED);
                }
                if (disk_unlink(path) != 0) {
                        archive_set_error(&a->archive, errno,
-                           "Can't create directory '%s': "
+                           "Can't create directory '%ls': "
                            "Conflicting file cannot be removed",
                            path);
                        return (ARCHIVE_FAILED);
@@ -2146,7 +2146,7 @@ create_dir(struct archive_write_disk *a, wchar_t *path)
        } else if (errno != ENOENT && errno != ENOTDIR) {
                /* Stat failed? */
                archive_set_error(&a->archive, errno,
-                   "Can't test directory '%s'", path);
+                   "Can't test directory '%ls'", path);
                return (ARCHIVE_FAILED);
        } else if (slash != NULL) {
                *slash = '\0';
@@ -2199,7 +2199,7 @@ create_dir(struct archive_write_disk *a, wchar_t *path)
            S_ISDIR(st_mode))
                return (ARCHIVE_OK);
 
-       archive_set_error(&a->archive, errno, "Failed to create dir '%s'",
+       archive_set_error(&a->archive, errno, "Failed to create dir '%ls'",
            path);
        return (ARCHIVE_FAILED);
 }
@@ -2228,7 +2228,7 @@ set_ownership(struct archive_write_disk *a)
        }
 
        archive_set_error(&a->archive, errno,
-           "Can't set user=%jd/group=%jd for %s",
+           "Can't set user=%jd/group=%jd for %ls",
            (intmax_t)a->uid, (intmax_t)a->gid, a->name);
        return (ARCHIVE_WARN);
 }