Skip to content

Commit 7fa1321

Browse files
Merge pull request #800 from alexdeem/fix/workspace-with-symlink
2 parents d5c7a4d + 955e6d0 commit 7fa1321

File tree

1 file changed

+3
-2
lines changed
  • CodeEditModules/Modules/WorkspaceClient/src

1 file changed

+3
-2
lines changed

CodeEditModules/Modules/WorkspaceClient/src/Live.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public extension WorkspaceClient {
2323
/// - Parameter url: The URL of the directory to load the items of
2424
/// - Returns: `[FileItem]` representing the contents of the directory
2525
func loadFiles(fromURL url: URL) throws -> [FileItem] {
26-
let directoryContents = try fileManager.contentsOfDirectory(at: url, includingPropertiesForKeys: nil)
26+
let directoryContents = try fileManager.contentsOfDirectory(at: url.resolvingSymlinksInPath(),
27+
includingPropertiesForKeys: nil)
2728
var items: [FileItem] = []
2829

2930
for itemURL in directoryContents {
@@ -75,7 +76,7 @@ public extension WorkspaceClient {
7576
var didChangeSomething = false
7677

7778
// get the actual directory children
78-
let directoryContentsUrls = try fileManager.contentsOfDirectory(at: fileItem.url,
79+
let directoryContentsUrls = try fileManager.contentsOfDirectory(at: fileItem.url.resolvingSymlinksInPath(),
7980
includingPropertiesForKeys: nil)
8081

8182
// test for deleted children, and remove them from the index

0 commit comments

Comments
 (0)