Skip to content

Commit

Permalink
Ignore content of .qfieldsync folder when seeking project file
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jul 20, 2024
1 parent 1fa0323 commit 4397dbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/android/src/ch/opengis/qfield/QFieldUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions src/core/appinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

1 comment on commit 4397dbb

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.