瀏覽代碼

VLCDropboxController: Encode destination path with URLPathAllowedCharacterSet

(closes #562)
Soomin Lee 6 年之前
父節點
當前提交
9a2f555e6f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Sources/VLCDropboxController.m

+ 3 - 0
Sources/VLCDropboxController.m

@@ -244,6 +244,9 @@
     destination = [destination stringByReplacingOccurrencesOfString:@" " withString:@"_"];
 
     destination = [self _createPotentialNameFrom:destination];
+    destination = [destination
+                   stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet
+                                                                       URLPathAllowedCharacterSet]];
 
     [[[self.client.filesRoutes downloadUrl:path overwrite:YES destination:[NSURL URLWithString:destination]]
         setResponseBlock:^(DBFILESFileMetadata * _Nullable result, DBFILESDownloadError * _Nullable routeError, DBRequestError * _Nullable networkError, NSURL * _Nonnull destination) {