فهرست منبع

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) {