[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kcontrol/kfontinst/kio
From: Craig Drummond <craig () kde ! org>
Date: 2005-04-20 19:46:17
Message-ID: 20050420194617.BC2E1656 () office ! kde ! org
[Download RAW message or body]
CVS commit by craig:
Dont allow to install hidden fonts - as fontconfig will ignore these, and therefore
fonts:/ will not display them, and the user will think that the file has been lost!
M +18 -1 KioFonts.cpp 1.57
--- kdebase/kcontrol/kfontinst/kio/KioFonts.cpp #1.56:1.57
@@ -549,4 +549,9 @@ static QString getMatch(const QString &f
}
+inline bool isHidden(const KURL &u)
+{
+ return QChar('.')==u.fileName()[0];
+}
+
namespace KFI
{
@@ -920,4 +925,10 @@ void CKioFonts::put(const KURL &u, int m
KFI_DBUG << "put " << u.path() << endl;
+ if(isHidden(u))
+ {
+ error(KIO::ERR_WRITE_ACCESS_DENIED, u.prettyURL());
+ return;
+ }
+
updateFontList();
@@ -1159,4 +1170,10 @@ void CKioFonts::copy(const KURL &src, co
KFI_DBUG << "copy " << src.prettyURL() << " - " << d.prettyURL() << endl;
+ if(isHidden(d))
+ {
+ error(KIO::ERR_WRITE_ACCESS_DENIED, d.prettyURL());
+ return;
+ }
+
if(updateFontList() && checkUrl(src) && checkAllowed(src))
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic