summaryrefslogtreecommitdiff
path: root/Src/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules')
-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");
}