AppletScript & configAccepted

Petri Damstén petri.damsten at gmail.com
Mon Sep 15 10:51:51 CEST 2008


If we are looking root of that package (It's equal to path() but needed in 
dashboard to set "root" to this) then basepath is /some/path/ and canonical is 
/some/path and startsWith does not match. Is it ok to add '/' to 
canonicalPath?

Index: package.cpp
===================================================================
--- package.cpp (revision 860648)
+++ package.cpp (working copy)
@@ -136,7 +136,7 @@
         // ensure that we don't return files outside of our base path
         // due to symlink or ../ games
         QDir dir(path);
-        QString canonicalized = dir.canonicalPath();
+        QString canonicalized = dir.canonicalPath() + '/';
         if (canonicalized.startsWith(d->basePath)) {
             return path;
         }

Petri

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080915/5fe5f2db/attachment.sig 


More information about the Plasma-devel mailing list