pCloud / pcloud-sdk-swift

The official pCloud Swift SDK for iOS and macOS for integration with the pCloud API.
MIT License
22 stars 7 forks source link

Crash on file upload #22

Closed demoszp closed 2 months ago

demoszp commented 2 months ago

Hello, team if the uploaded file has modification date older than 1 January 1970, than SDK produces crash on this line of code PCloudAPI.swift:620 parameters.append(.number(name: "mtime", value: UInt64(modificationDate.timeIntervalSince1970))) crash occurs because timeIntervalSince1970 return negative number for such date Will be glad if you can fix this

tmpit commented 2 months ago

Hey, I'll take a look at it on the 9th. I think I'll just trim the value to 0. Better than to bitcast and end up with garbage. If you need a more specific handling, you'll have to do it on your side.

tmpit commented 2 months ago

Released in 3.2.2.