Skip to content

Commit 3e2bec8

Browse files
Merge pull request #9 from codelathe/bugfix/modify-iflastmodified-and-nofileoverwrite-flags
Updated flag check
2 parents 49fcc1b + 1877b6d commit 3e2bec8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

filecloudapi/fcserver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,10 +817,10 @@ def close(self):
817817
}
818818

819819
if nofileoverwrite is not None:
820-
params["nofileoverwrite"] = "true" if nofileoverwrite else "false"
820+
params["nofileoverwrite"] = 1 if nofileoverwrite else 0
821821

822822
if iflastmodified is not None:
823-
params["iflastmodified"] = self._serverdatetime(iflastmodified)
823+
params["iflastmodified"] = str(int(iflastmodified.timestamp()))
824824

825825
params_str = urlencode(params)
826826

@@ -865,10 +865,10 @@ def close(self):
865865
}
866866

867867
if nofileoverwrite is not None:
868-
params["nofileoverwrite"] = "true" if nofileoverwrite else "false"
868+
params["nofileoverwrite"] = 1 if nofileoverwrite else 0
869869

870870
if iflastmodified is not None:
871-
params["iflastmodified"] = self._serverdatetime(iflastmodified)
871+
params["iflastmodified"] = str(int(iflastmodified.timestamp()))
872872

873873
if data_size is not None:
874874
params["filesize"] = data_size

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22

33
name = "filecloudapi-python"
4-
version = "0.4.0"
4+
version = "0.4.1"
55
description = "A Python library to connect to a Filecloud server"
66

77
packages = [{ include = "filecloudapi" }]

0 commit comments

Comments
 (0)