aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2017-10-16 18:05:58 +0200
committerPetter Rodhelind <petter.rodhelind@gmail.com>2017-10-16 18:05:58 +0200
commit1ce2713f90fa4b510a49fdbc7c8285d179ffe5a4 (patch)
tree4a93e63d6f24a474311821c44e892c9f87414462 /src/cmd/acme
parent785d7b84cb48fbf6bd033a5fda7f58762fb2e284 (diff)
downloadplan9port-1ce2713f90fa4b510a49fdbc7c8285d179ffe5a4.tar.gz
plan9port-1ce2713f90fa4b510a49fdbc7c8285d179ffe5a4.tar.bz2
plan9port-1ce2713f90fa4b510a49fdbc7c8285d179ffe5a4.zip
acme: Hide dotfiles in dirs.
These can easily be shown in a win-window with 'ls -a'...
Diffstat (limited to 'src/cmd/acme')
-rw-r--r--src/cmd/acme/text.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c
index 61bc12d9..4c4e1be1 100644
--- a/src/cmd/acme/text.c
+++ b/src/cmd/acme/text.c
@@ -243,6 +243,9 @@ textload(Text *t, uint q0, char *file, int setqid)
dbuf = nil;
while((n=dirread(fd, &dbuf)) > 0){
for(i=0; i<n; i++){
+ if(dbuf[i].name[0] == '.'){
+ continue; /* do not list dot files */
+ }
dl = emalloc(sizeof(Dirlist));
j = strlen(dbuf[i].name);
tmp = emalloc(j+1+1);