From ee032a7a2c7b138d23f37e8757195e366abe4262 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 20 Jul 2024 10:39:52 +0700 Subject: [PATCH] Ignore content of .qfieldsync folder when seeking project file --- platform/android/src/ch/opengis/qfield/QFieldUtils.java | 4 +++- src/core/appinterface.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/android/src/ch/opengis/qfield/QFieldUtils.java b/platform/android/src/ch/opengis/qfield/QFieldUtils.java index 33b1a9e3b2..7fda430650 100644 --- a/platform/android/src/ch/opengis/qfield/QFieldUtils.java +++ b/platform/android/src/ch/opengis/qfield/QFieldUtils.java @@ -73,7 +73,9 @@ public static String getArchiveProjectName(InputStream in) { ZipEntry entry; while ((entry = zin.getNextEntry()) != null) { String entryName = entry.getName().toLowerCase(); - if (entryName.endsWith(".qgs") || entryName.endsWith(".qgz")) { + if ((entryName.endsWith(".qgs") || + entryName.endsWith(".qgz")) && + !entryName.contains(".qfieldsync")) { projectName = entry.getName(); break; } diff --git a/src/core/appinterface.cpp b/src/core/appinterface.cpp index 5c10e9716e..6a9388f372 100644 --- a/src/core/appinterface.cpp +++ b/src/core/appinterface.cpp @@ -125,6 +125,7 @@ bool AppInterface::hasProjectOnLaunch() const bool AppInterface::loadFile( const QString &path, const QString &name ) { + qInfo() << QStringLiteral( "AppInterface loading file: %1" ).arg( path ); if ( QFileInfo::exists( path ) ) { return mApp->loadProjectFile( path, name );