mirror of
https://github.com/nab138/isideload.git
synced 2026-03-02 22:46:15 +01:00
Close file handle after single file upload
This commit is contained in:
@@ -18,12 +18,12 @@ vendored-botan = ["icloud_auth/vendored-botan"]
|
||||
[dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
plist = { version = "1.7" }
|
||||
icloud_auth = { version = "0.1.4", package = "nab138_icloud_auth"}
|
||||
icloud_auth = { version = "0.1.4", package = "nab138_icloud_auth" }
|
||||
uuid = { version = "1.17.0", features = ["v4"] }
|
||||
zip = { version = "4.3", default-features = false, features = ["deflate"] }
|
||||
hex = "0.4"
|
||||
sha1 = "0.10"
|
||||
idevice = { version = "0.1.45", features = ["afc", "installation_proxy"] }
|
||||
idevice = { version = "0.1.46", features = ["afc", "installation_proxy"] }
|
||||
openssl = "0.10"
|
||||
zsign-rust = "0.1.6"
|
||||
thiserror = "2"
|
||||
|
||||
@@ -80,7 +80,11 @@ fn afc_upload_dir<'a>(
|
||||
.map_err(|e| Error::IdeviceError(e))?;
|
||||
let bytes = std::fs::read(&path).map_err(|e| Error::Filesystem(e))?;
|
||||
file_handle
|
||||
.write(&bytes)
|
||||
.write_entire(&bytes)
|
||||
.await
|
||||
.map_err(|e| Error::IdeviceError(e))?;
|
||||
file_handle
|
||||
.close()
|
||||
.await
|
||||
.map_err(|e| Error::IdeviceError(e))?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user