Skip to content

Commit 00df6a0

Browse files
authored
Merge pull request #181 from MartinLau7/main
Fixed the issue of incorrect path on macOS when resuming uploads
2 parents afc4675 + e0ad42b commit 00df6a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/TUSKit/Files.swift

+2
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ final class Files {
9797
if let data = try? Data(contentsOf: url) {
9898
let metaData = try? decoder.decode(UploadMetadata.self, from: data)
9999

100+
#if os(iOS)
100101
// The documentsDirectory can change between restarts (at least during testing). So we update the filePath to match the existing plist again. To avoid getting an out of sync situation where the filePath still points to a dir in a different directory than the plist.
101102
// (The plist and file to upload should always be in the same dir together).
102103
metaData?.filePath = url.deletingPathExtension()
104+
#endif
103105

104106
return metaData
105107
}

0 commit comments

Comments
 (0)