Skip to content

Commit 10dec91

Browse files
committed
Store staged PFFiles in cache directory.
1 parent 527b2d1 commit 10dec91

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Parse/Internal/File/Controller/PFFileStagingController.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ + (instancetype)controllerWithDataSource:(id<PFFileManagerProvider>)dataSource {
5151
///--------------------------------------
5252

5353
- (NSString *)stagedFilesDirectoryPath {
54-
NSString *folderPath = [self.dataSource.fileManager parseLocalSandboxDataDirectoryPath];
55-
return [folderPath stringByAppendingPathComponent:PFFileStagingControllerDirectoryName_];
54+
return [self.dataSource.fileManager parseCacheItemPathForPathComponent:PFFileStagingControllerDirectoryName_];
5655
}
5756

5857
///--------------------------------------
@@ -89,7 +88,7 @@ - (NSString *)stagedFilePathForFileWithName:(NSString *)name uniqueId:(uint64_t)
8988
- (BFTask *)_clearStagedFilesAsync {
9089
return [_taskQueue enqueue:^id(BFTask *task) {
9190
NSString *stagedFilesDirectoryPath = [self stagedFilesDirectoryPath];
92-
return [PFFileManager removeItemAtPathAsync:stagedFilesDirectoryPath];
91+
return [PFFileManager removeItemAtPathAsync:stagedFilesDirectoryPath withFileLock:NO];
9392
}];
9493
}
9594

0 commit comments

Comments
 (0)