1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 07:13:24 +03:00
This commit is contained in:
Tae Won Ha 2016-10-08 19:58:21 +02:00
parent 774e74d726
commit 3417d806b5
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
3 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ class FileItemService: StandardFlow {
// TODO Remove cached items more aggressively?
let hasRelations = self.monitors.keys.reduce(false) { (result, monitoredUrl) in
return result ? result : monitoredUrl.parent(ofUrl: url) || url.parent(ofUrl: monitoredUrl)
return result ? result : monitoredUrl.isParent(of: url) || url.isParent(of: monitoredUrl)
}
if hasRelations {

View File

@ -62,7 +62,7 @@ extension FileOutlineView {
self.fileItems.remove(fileItem)
if fileItem.dir {
self.fileItems
.filter { fileItem.url.parent(ofUrl: $0.url) }
.filter { fileItem.url.isParent(of: $0.url) }
.forEach { self.fileItems.remove($0) }
}
}

View File

@ -7,7 +7,7 @@ import Foundation
extension URL {
func parent(ofUrl url: URL) -> Bool {
func isParent(of url: URL) -> Bool {
guard self.isFileURL && url.isFileURL else {
return false
}