summaryrefslogtreecommitdiff
path: root/Src/Modules/stat.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2022-05-08 05:47:24 +0200
committerAxel Beckert <abe@deuxchevaux.org>2022-05-08 05:47:24 +0200
commit5615b53bbf3578a91bab8658b38d0352433510e7 (patch)
treebdf29751a810afd43ab7497d47229ba64d5707e8 /Src/Modules/stat.c
parent514524ee7be382a740e53e2a7c0247f2d68d7730 (diff)
parent9529af723604dfe1c8152db11e1d216621c898d5 (diff)
downloadzsh-5615b53bbf3578a91bab8658b38d0352433510e7.tar.gz
zsh-5615b53bbf3578a91bab8658b38d0352433510e7.zip
Update upstream source from tag 'upstream/5.8.1.3-test'
Update to upstream version '5.8.1.3-test' with Debian dir db59cf6a81e7a92e349f815dc21759ccb7ed689a
Diffstat (limited to 'Src/Modules/stat.c')
-rw-r--r--Src/Modules/stat.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Src/Modules/stat.c b/Src/Modules/stat.c
index 7c736072b..0df9b35b7 100644
--- a/Src/Modules/stat.c
+++ b/Src/Modules/stat.c
@@ -503,8 +503,10 @@ bin_stat(char *name, char **args, Options ops, UNUSED(int func))
if (OPT_ISSET(ops,'f'))
nargs = 1;
else
- for (aptr = args; *aptr; aptr++)
+ for (aptr = args; *aptr; aptr++) {
+ unmetafy(*aptr, NULL);
nargs++;
+ }
if (OPT_ISSET(ops,'g')) {
flags |= STF_GMT;
@@ -555,8 +557,8 @@ bin_stat(char *name, char **args, Options ops, UNUSED(int func))
for (; OPT_ISSET(ops,'f') || *args; args++) {
char outbuf[PATH_MAX + 9]; /* "link " + link name + NULL */
int rval = OPT_ISSET(ops,'f') ? fstat(fd, &statbuf) :
- OPT_ISSET(ops,'L') ? lstat(unmeta(*args), &statbuf) :
- stat(unmeta(*args), &statbuf);
+ OPT_ISSET(ops,'L') ? lstat(*args, &statbuf) :
+ stat(*args, &statbuf);
if (rval) {
if (OPT_ISSET(ops,'f'))
sprintf(outbuf, "%d", fd);
@@ -571,10 +573,10 @@ bin_stat(char *name, char **args, Options ops, UNUSED(int func))
if (flags & STF_FILE) {
if (arrnam)
- *arrptr++ = ztrdup(*args);
+ *arrptr++ = ztrdup_metafy(*args);
else if (hashnam) {
*hashptr++ = ztrdup(HNAMEKEY);
- *hashptr++ = ztrdup(*args);
+ *hashptr++ = ztrdup_metafy(*args);
} else
printf("%s%s", *args, (flags & STF_PICK) ? " " : ":\n");
}