X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fmisc.c;h=0ade2000d4352fb46484f9b1d02d9dec2e722177;hb=5cf84df777c8c9d069ee2d83e71f04c53586a3b2;hp=51561e4dc9c770dc4eb6e5450555ba5b709c75fc;hpb=7347b4f5d51c15bb19637ea52e9bf7dff832cc52;p=chaz%2Ftar diff --git a/src/misc.c b/src/misc.c index 51561e4..0ade200 100644 --- a/src/misc.c +++ b/src/misc.c @@ -317,7 +317,8 @@ remove_any_file (const char *file_name, enum remove_option option) entry += entrylen + 1) { char *file_name_buffer = new_name (file_name, entry); - int r = remove_any_file (file_name_buffer, 1); + int r = remove_any_file (file_name_buffer, + RECURSIVE_REMOVE_OPTION); int e = errno; free (file_name_buffer); @@ -548,6 +549,10 @@ static void call_arg_error (char const *call, char const *name) { int e = errno; + /* TRANSLATORS: %s after `Cannot' is a function name, e.g. `Cannot open'. + Directly translating this to another language will not work, first because + %s itself is not translated. + Translate it as `%s: Function %s failed'. */ ERROR ((0, e, _("%s: Cannot %s"), quotearg_colon (name), call)); } @@ -557,6 +562,10 @@ static void call_arg_fatal (char const *call, char const *name) { int e = errno; + /* TRANSLATORS: %s after `Cannot' is a function name, e.g. `Cannot open'. + Directly translating this to another language will not work, first because + %s itself is not translated. + Translate it as `%s: Function %s failed'. */ FATAL_ERROR ((0, e, _("%s: Cannot %s"), quotearg_colon (name), call)); } @@ -566,6 +575,10 @@ static void call_arg_warn (char const *call, char const *name) { int e = errno; + /* TRANSLATORS: %s after `Cannot' is a function name, e.g. `Cannot open'. + Directly translating this to another language will not work, first because + %s itself is not translated. + Translate it as `%s: Function %s failed'. */ WARN ((0, e, _("%s: Warning: Cannot %s"), quotearg_colon (name), call)); } @@ -685,8 +698,8 @@ read_error_details (char const *name, off_t offset, size_t size) char buf[UINTMAX_STRSIZE_BOUND]; int e = errno; ERROR ((0, e, - ngettext ("%s: Read error at byte %s, reading %lu byte", - "%s: Read error at byte %s, reading %lu bytes", + ngettext ("%s: Read error at byte %s, while reading %lu byte", + "%s: Read error at byte %s, while reading %lu bytes", size), quotearg_colon (name), STRINGIFY_BIGINT (offset, buf), (unsigned long) size)); @@ -698,8 +711,8 @@ read_warn_details (char const *name, off_t offset, size_t size) char buf[UINTMAX_STRSIZE_BOUND]; int e = errno; WARN ((0, e, - ngettext ("%s: Warning: Read error at byte %s, reading %lu byte", - "%s: Warning: Read error at byte %s, reading %lu bytes", + ngettext ("%s: Warning: Read error at byte %s, while reading %lu byte", + "%s: Warning: Read error at byte %s, while reading %lu bytes", size), quotearg_colon (name), STRINGIFY_BIGINT (offset, buf), (unsigned long) size)); @@ -824,6 +837,12 @@ symlink_error (char const *contents, char const *name) quotearg_colon (name), quote_n (1, contents))); } +void +stat_fatal (char const *name) +{ + call_arg_fatal ("stat", name); +} + void stat_error (char const *name) {