Преглед на файлове

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