Fixed utf8 filenames issue in OneDrive

This commit is contained in:
Amir Abbas
2018-03-07 09:56:53 +03:30
parent 4b0fffc691
commit a6550b0ec3
+2 -2
View File
@@ -134,9 +134,9 @@ public final class OneDriveFileObject: FileObject {
}
static func relativePathOf(url: URL, baseURL: URL?, route: OneDriveFileProvider.Route) -> String {
let base = baseURL?.appendingPathComponent(route.drivePath)
let base = baseURL?.appendingPathComponent(route.drivePath).path ?? ""
let crudePath = url.absoluteString.replacingOccurrences(of: base?.absoluteString ?? "", with: "", options: .anchored)
let crudePath = url.path.replacingOccurrences(of: base, with: "", options: .anchored)
.trimmingCharacters(in: CharacterSet(charactersIn: "/"))
switch crudePath {