Petri Damstén wrote: > 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?
What you probably want is QDir::separator(). http://doc.trolltech.com/4.4/qdir.html#separator > 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 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel