forked from DDoSolitary/LxRunOffline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch libarchive to remove path separator conversion.
- Loading branch information
1 parent
93a24a0
commit f1a59d4
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
diff --git a/libarchive/archive_windows.c b/libarchive/archive_windows.c | ||
index 624e2700..c923ca9d 100644 | ||
--- a/libarchive/archive_windows.c | ||
+++ b/libarchive/archive_windows.c | ||
@@ -748,41 +748,7 @@ fix_pathseparator(struct archive_entry *entry) | ||
struct archive_entry * | ||
__la_win_entry_in_posix_pathseparator(struct archive_entry *entry) | ||
{ | ||
- struct archive_entry *entry_main; | ||
- const wchar_t *wp; | ||
- int has_backslash = 0; | ||
- int ret; | ||
- | ||
- wp = archive_entry_pathname_w(entry); | ||
- if (wp != NULL && wcschr(wp, L'\\') != NULL) | ||
- has_backslash = 1; | ||
- if (!has_backslash) { | ||
- wp = archive_entry_hardlink_w(entry); | ||
- if (wp != NULL && wcschr(wp, L'\\') != NULL) | ||
- has_backslash = 1; | ||
- } | ||
- if (!has_backslash) { | ||
- wp = archive_entry_symlink_w(entry); | ||
- if (wp != NULL && wcschr(wp, L'\\') != NULL) | ||
- has_backslash = 1; | ||
- } | ||
- /* | ||
- * If there is no backslash chars, return the original. | ||
- */ | ||
- if (!has_backslash) | ||
- return (entry); | ||
- | ||
- /* Copy entry so we can modify it as needed. */ | ||
- entry_main = archive_entry_clone(entry); | ||
- if (entry_main == NULL) | ||
- return (NULL); | ||
- /* Replace the Windows path-separator '\' with '/'. */ | ||
- ret = fix_pathseparator(entry_main); | ||
- if (ret < ARCHIVE_WARN) { | ||
- archive_entry_free(entry_main); | ||
- return (NULL); | ||
- } | ||
- return (entry_main); | ||
+ return entry; | ||
} | ||
|
||
|