aboutsummaryrefslogtreecommitdiff
path: root/src/xz/file_io.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-10-25 18:30:55 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-10-25 18:30:55 +0300
commit8b46ae8cdeddfd7dc01fec92971b8696e9a96c5d (patch)
tree11c755617e662aa047f484f9068c73a8368cd229 /src/xz/file_io.c
parentxz: If input file cannot be removed, treat it as a warning, not error. (diff)
downloadxz-8b46ae8cdeddfd7dc01fec92971b8696e9a96c5d.tar.xz
xz: Refactor to remove is_empty_filename().
Long ago it was used in list.c too but nowadays it's needed only in io_open_src() so it's nicer to avoid a separate function.
Diffstat (limited to 'src/xz/file_io.c')
-rw-r--r--src/xz/file_io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
index b559ae35..046ca7e3 100644
--- a/src/xz/file_io.c
+++ b/src/xz/file_io.c
@@ -748,8 +748,10 @@ error:
extern file_pair *
io_open_src(const char *src_name)
{
- if (is_empty_filename(src_name))
+ if (src_name[0] == '\0') {
+ message_error(_("Empty filename, skipping"));
return NULL;
+ }
// Since we have only one file open at a time, we can use
// a statically allocated structure.