File tree Expand file tree Collapse file tree
CodeEdit/Features/Documents/Controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ final class CodeEditDocumentController: NSDocumentController {
8080 /// - Parameter url: The file URL to open.
8181 /// - Returns: True, if the document was opened in a workspace.
8282 private func openFileInExistingWorkspace( url: URL ) -> Bool {
83- guard url. isFileURL else { return false }
83+ guard ! url. isFolder else { return false }
8484 let workspaces = documents. compactMap ( { $0 as? WorkspaceDocument } )
8585
8686 // Check open workspaces for the file being opened. Sorted by shared components with the url so we
@@ -91,6 +91,7 @@ final class CodeEditDocumentController: NSDocumentController {
9191 // createIfNotFound will still return `nil` if the files don't share a common ancestor.
9292 if let newFile = workspace. workspaceFileManager? . getFile ( url. absolutePath, createIfNotFound: true ) {
9393 workspace. editorManager? . openTab ( item: newFile)
94+ workspace. showWindows ( )
9495 return true
9596 }
9697 }
You can’t perform that action at this time.
0 commit comments