Skip to content

Commit

Permalink
Fix download/upload files with the proper get_md5sum
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Oct 25, 2023
1 parent 151a35b commit f534e37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qfieldcloud_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from requests.adapters import HTTPAdapter, Retry

from .interfaces import QfcException, QfcRequest, QfcRequestException
from .utils import log
from .utils import get_md5sum, log

logger = logging.getLogger(__file__)

Expand Down Expand Up @@ -217,7 +217,7 @@ def upload_files(
remote_file = f
break

md5sum = self._get_md5sum(local_file["absolute_filename"])
md5sum = get_md5sum(local_file["absolute_filename"])
if remote_file and remote_file.get("md5sum", None) == md5sum:
continue

Expand Down Expand Up @@ -595,7 +595,7 @@ def download_file(
"""

if remote_md5sum and local_filename.exists():
if self._get_md5sum(str(local_filename)) == remote_md5sum:
if get_md5sum(str(local_filename)) == remote_md5sum:
if show_progress:
print(
f"{remote_filename}: Already present locally. Download skipped."
Expand Down

0 comments on commit f534e37

Please sign in to comment.