FreeBSD Bugzilla – Attachment 199000 Details for
Bug 233006
[regression] [patch] bsdtar aborts creation of archive on ENOENT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
draft patch
la.diff (text/plain), 1.54 KB, created by
Eugene Grosbein
on 2018-11-06 05:10:35 UTC
(
hide
)
Description:
draft patch
Filename:
MIME Type:
Creator:
Eugene Grosbein
Created:
2018-11-06 05:10:35 UTC
Size:
1.54 KB
patch
obsolete
>Index: libarchive/archive_read_disk_posix.c >=================================================================== >--- libarchive/archive_read_disk_posix.c (revision 335757) >+++ libarchive/archive_read_disk_posix.c (working copy) >@@ -856,7 +856,11 @@ next_entry(struct archive_read_disk *a, > const struct stat *st; /* info to use for this entry */ > const struct stat *lst;/* lstat() information */ > const char *name; >- int descend, r; >+ int delayed, delayed_errno, descend, r; >+ struct archive_string delayed_str; >+ >+ delayed = ARCHIVE_OK; >+ archive_string_init(&delayed_str); > > st = NULL; > lst = NULL; >@@ -885,11 +889,19 @@ next_entry(struct archive_read_disk *a, > case TREE_REGULAR: > lst = tree_current_lstat(t); > if (lst == NULL) { >+ if (errno == ENOENT) { >+ delayed = ARCHIVE_WARN; >+ delayed_errno = errno; >+ archive_string_sprintf(&delayed_str, >+ "%s: File removed before we read it", >+ tree_current_path(t)); >+ } else { > archive_set_error(&a->archive, errno, > "%s: Cannot stat", > tree_current_path(t)); > tree_enter_initial_dir(t); > return (ARCHIVE_FAILED); >+ } > } > break; > } >@@ -1083,6 +1095,15 @@ next_entry(struct archive_read_disk *a, > r = archive_read_disk_entry_from_file(&(a->archive), entry, > t->entry_fd, st); > >+ if (r == ARCHIVE_OK) { >+ r = delayed; >+ if (r != ARCHIVE_OK) >+ archive_set_error(&(a->archive), delayed_errno, >+ "%s", delayed_str.s); >+ } >+ if (!archive_string_empty(&delayed_str)) >+ archive_string_free(&delayed_str); >+ > return (r); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233006
: 199000