From a744f7636be7d6753ff8433985d5dc0352012258 Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Mon, 30 Aug 1999 11:40:29 +0000 Subject: [PATCH] For Unix, don't return "." ".." or any file/directory that begins with a "."! Perhaps we should really end up having a preference that determines whether to return these "hidden" items or not. git-svn-id: svn://10.0.0.236/trunk@45146 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsFileSpecUnix.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mozilla/xpcom/io/nsFileSpecUnix.cpp b/mozilla/xpcom/io/nsFileSpecUnix.cpp index 3c3cfde5020..1102debbb2b 100644 --- a/mozilla/xpcom/io/nsFileSpecUnix.cpp +++ b/mozilla/xpcom/io/nsFileSpecUnix.cpp @@ -191,7 +191,10 @@ PRBool nsFileSpec::IsHidden() const char *leafname = GetLeafName(); if (nsnull != leafname) { - if ((!strcmp(leafname, ".")) || (!strcmp(leafname, ".."))) + // rjc: don't return ".", "..", or any file/directory that begins with a "." + + /* if ((!strcmp(leafname, ".")) || (!strcmp(leafname, ".."))) */ + if (leafname[0] == '.') { hidden = PR_TRUE; }