Skip to content

Commit 1147427

Browse files
authored
Merge pull request #19 from zweckj:feature/improve-hash-calculation
Feature/improve-hash-calculation
2 parents 7a90dbb + 8f672fa commit 1147427

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/pypi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: pypa/gh-action-pypi-publish@release/v1
5353

5454
- name: ✍️ Sign published artifacts
55-
uses: sigstore/gh-action-sigstore-python@v3.0.0
55+
uses: sigstore/gh-action-sigstore-python@v3.2.0
5656
with:
5757
inputs: ./dist/*.tar.gz ./dist/*.whl
5858
release-signing-artifacts: true

onedrive_personal_sdk/clients/large_file_upload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ async def start_upload(
150150

151151
async for chunk in self._file.content_stream:
152152
self._buffer.buffer += chunk
153-
quick_xor_hash.update(chunk)
154153
if self._buffer.length >= self._upload_chunk_size:
155154
total_uploaded_bytes = 0
156155
while (
@@ -162,6 +161,7 @@ async def start_upload(
162161
total_uploaded_bytes : total_uploaded_bytes
163162
+ current_chunk_size
164163
]
164+
quick_xor_hash.update(chunk_view)
165165
try:
166166
chunk_result = await self._async_upload_chunk(
167167
upload_session.upload_url,
@@ -264,6 +264,7 @@ async def start_upload(
264264
# upload the remaining bytes
265265
if self._buffer.buffer:
266266
_LOGGER.debug("Last chunk")
267+
quick_xor_hash.update(self._buffer.buffer)
267268
# try:
268269
result = await self._async_upload_chunk(
269270
upload_session.upload_url,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "onedrive-personal-sdk"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
license = "MIT"
55
description = "A package to interact with the Microsoft Graph API for personal OneDrives."
66
readme = "README.md"

0 commit comments

Comments
 (0)