Skip to content

Commit

Permalink
PR/57858: Ricardo Branco: Print the full pathname on errors.
Browse files Browse the repository at this point in the history
from FreeBSD NetBSD/src#25
  • Loading branch information
zoulasc committed Jan 15, 2024
1 parent ca04099 commit bcefcab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions usr.bin/gzip/gzip.c
@@ -1,4 +1,4 @@
/* $NetBSD: gzip.c,v 1.120 2024/01/14 18:12:59 mrg Exp $ */
/* $NetBSD: gzip.c,v 1.121 2024/01/15 17:35:48 christos Exp $ */

/*
* Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2015, 2017
Expand Down Expand Up @@ -31,7 +31,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008,\
2009, 2010, 2011, 2015, 2017 Matthew R. Green. All rights reserved.");
__RCSID("$NetBSD: gzip.c,v 1.120 2024/01/14 18:12:59 mrg Exp $");
__RCSID("$NetBSD: gzip.c,v 1.121 2024/01/15 17:35:48 christos Exp $");
#endif /* not lint */

/*
Expand Down Expand Up @@ -2037,7 +2037,7 @@ handle_dir(char *dir)

path_argv[0] = dir;
path_argv[1] = 0;
fts = fts_open(path_argv, FTS_PHYSICAL, NULL);
fts = fts_open(path_argv, FTS_PHYSICAL | FTS_NOCHDIR, NULL);
if (fts == NULL) {
warn("couldn't fts_open %s", dir);
return;
Expand All @@ -2055,7 +2055,7 @@ handle_dir(char *dir)
maybe_warn("%s", entry->fts_path);
continue;
case FTS_F:
handle_file(entry->fts_name, entry->fts_statp);
handle_file(entry->fts_path, entry->fts_statp);
}
}
(void)fts_close(fts);
Expand Down

0 comments on commit bcefcab

Please sign in to comment.