depot/third_party/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-no-canonicalize-filepath.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

27 lines
943 B
Diff

Index: grantlee-5.1.0/templates/lib/templateloader.cpp
===================================================================
--- grantlee-5.1.0.orig/templates/lib/templateloader.cpp
+++ grantlee-5.1.0/templates/lib/templateloader.cpp
@@ -142,10 +142,6 @@ Template FileSystemTemplateLoader::loadByName(const QString &fileName,
+ QLatin1Char('/') + fileName);
const QFileInfo fi(file);
- if (file.exists()
- && !fi.canonicalFilePath().contains(
- QDir(d->m_templateDirs.at(i)).canonicalPath()))
- return Template();
++i;
}
@@ -173,11 +169,6 @@ FileSystemTemplateLoader::getMediaUri(co
+ QLatin1Char('/') + fileName);
const QFileInfo fi(file);
- if (!fi.canonicalFilePath().contains(
- QDir(d->m_templateDirs.at(i)).canonicalPath())) {
- ++i;
- continue;
- }
if (file.exists()) {
auto path = fi.absoluteFilePath();