standardizedURL should have been URLByStandardizingPath

This commit is contained in:
Matthias Neeracher 2015-02-18 15:12:02 +01:00 committed by Matthias Neeracher
parent c5f47d55a6
commit a559f9bf6e
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ class ASBuilder {
}
func setProjectURL(url: NSURL) {
dir = url.URLByDeletingLastPathComponent!.standardizedURL!
dir = url.URLByDeletingLastPathComponent!.URLByStandardizingPath!
}
func stop() {

View File

@ -166,9 +166,9 @@ class ASFileItem : ASFileNode {
init(_ prop: NSDictionary, withRootURL rootURL: NSURL) {
type = ASFileType(rawValue: prop[kKindKey] as! String)!
if let relativeURL = NSURL(string: prop[kPathKey] as! String, relativeToURL: rootURL) {
url = relativeURL.standardizedURL!
url = relativeURL.URLByStandardizingPath!
} else {
url = NSURL(fileURLWithPath:(prop[kPathKey] as! String))!.standardizedURL!
url = NSURL(fileURLWithPath:(prop[kPathKey] as! String))!.URLByStandardizingPath!
}
}
override func nodeName() -> String {
@ -223,7 +223,7 @@ class ASFileTree : NSObject, NSOutlineViewDataSource {
}
func setProjectURL(url: NSURL) {
root.name = url.lastPathComponent!.stringByDeletingPathExtension
dir = url.URLByDeletingLastPathComponent!.standardizedURL!
dir = url.URLByDeletingLastPathComponent!.URLByStandardizingPath!
}
func apply(closure: (ASFileNode) -> ()) {
root.apply(closure)