File tree 4 files changed +31
-4
lines changed
4 files changed +31
-4
lines changed Original file line number Diff line number Diff line change
1
+ # 3.4.1
2
+
3
+ ## Bugfix
4
+ - Corrected a mistake in delete file logic
5
+
1
6
# 3.4.0
2
7
3
8
## Bugfix
4
- - Fixed an issue that prevented TUSKit from uploading large files (2GB+) [ #193 ] ( https://github.com/tus/TUSKit/issues/193 )
9
+ - Fixed an issue that prevented TUSKit from uploading large files (2GB+) [ #193 ] ( https://github.com/tus/TUSKit/issues/193 ) **
5
10
6
11
# 3.3.0
7
12
Original file line number Diff line number Diff line change @@ -169,7 +169,10 @@ final class Files {
169
169
170
170
try queue. sync {
171
171
try FileManager . default. removeItem ( at: metaDataPath)
172
- try FileManager . default. removeItem ( at: metaDataCachePath)
172
+
173
+ if FileManager . default. fileExists ( atPath: metaDataCachePath. path) {
174
+ try FileManager . default. removeItem ( at: metaDataCachePath)
175
+ }
173
176
174
177
if FileManager . default. fileExists ( atPath: uploadDataCachePath. path) {
175
178
try FileManager . default. removeItem ( at: uploadDataCachePath)
Original file line number Diff line number Diff line change 7
7
8
8
Pod ::Spec . new do |s |
9
9
s . name = 'TUSKit'
10
- s . version = '3.4'
10
+ s . version = '3.4.1 '
11
11
s . summary = 'TUSKit client in Swift'
12
12
s . swift_version = '5.0'
13
13
Original file line number Diff line number Diff line change @@ -168,7 +168,26 @@ final class FilesTests: XCTestCase {
168
168
// Clean up metadata. Doing it here because normally cleaning up metadata also cleans up a file. But we don't have a file to clean up.
169
169
try FileManager . default. removeItem ( at: targetLocation)
170
170
}
171
-
171
+
172
+ func testMissingCachePathDoesNotThrow( ) throws {
173
+ let data = " TestData " . data ( using: . utf8) !
174
+ let id = UUID ( )
175
+ let path = try files. store ( data: data, id: id, preferredFileExtension: " .txt " )
176
+ let metaData = UploadMetadata (
177
+ id: id,
178
+ filePath: path,
179
+ uploadURL: URL ( string: " io.tus " ) !,
180
+ size: data. count,
181
+ customHeaders: [ : ] ,
182
+ mimeType: nil
183
+ )
184
+ XCTAssertNoThrow ( try files. encodeAndStore ( metaData: metaData) )
185
+
186
+ print ( " PATH " , path. path)
187
+
188
+ XCTAssertNoThrow ( try files. removeFileAndMetadata ( metaData) )
189
+ }
190
+
172
191
func testMakeSureFileIdIsSameAsStoredName( ) throws {
173
192
// A file is stored under a UUID, this must be the same as the metadata's id
174
193
let id = UUID ( )
You can’t perform that action at this time.
0 commit comments