Skip to content

Commit a4546d7

Browse files
authored
Merge pull request #98 from opengisch/avoiding_upload_files_from_qfieldsync_folder
Fixing upload of hidden folders
2 parents 55b6303 + 6eba3d3 commit a4546d7

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

qfieldcloud_sdk/sdk.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,11 +1374,17 @@ def list_local_files(
13741374
if not path.is_file():
13751375
continue
13761376

1377-
basename = path.relative_to(root_path).name
1378-
if basename.startswith(".") or basename.endswith("~"):
1377+
relative_name = path.relative_to(root_path)
1378+
1379+
skip_file = False
1380+
for part in relative_name.parts:
1381+
if part.startswith(".") or part.endswith("~"):
1382+
skip_file = True
1383+
break
1384+
1385+
if skip_file:
13791386
continue
13801387

1381-
relative_name = path.relative_to(root_path)
13821388
files.append(
13831389
{
13841390
"name": str(relative_name),

0 commit comments

Comments
 (0)