Skip to content

Commit

Permalink
Normaize local workspace path whe loading. Cleanup logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed May 9, 2024
1 parent 08495c9 commit c464801
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/text/text_editor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1439,10 +1439,9 @@ proc checkoutFileAsync*(self: TextDocumentEditor) {.async.} =
return

let res = await vcs.checkoutFile(path)
debugf"checkout res: {res}"
log lvlInfo, "Checkout result: {res}"

self.document.setReadOnly(ws.isFileReadOnly(path).await)

self.markDirty()

proc checkoutFile*(self: TextDocumentEditor) {.expose("editor.text").} =
Expand Down
2 changes: 0 additions & 2 deletions src/vcs/vcs_perforce.nim
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ proc detectClientAsync(self: VersionControlSystemPerforce) {.async.} =
if not client.contains(host):
continue

debugf"Checking client {client}"

let createdByIndex = client.find(" 'Created by")
if createdByIndex < 0:
continue
Expand Down
8 changes: 4 additions & 4 deletions src/workspaces/workspace_local.nim
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ proc detectVersionControlSystemIn(path: string): Option[VersionControlSystem] =

proc newWorkspaceFolderLocal*(path: string, additionalPaths: seq[string] = @[]): WorkspaceFolderLocal =
new result
result.path = path
result.name = fmt"Local:{path.absolutePath}"
result.info = createInfo(path, additionalPaths)
result.additionalPaths = additionalPaths
result.path = path.absolutePath.normalizePathUnix
result.name = fmt"Local:{result.path}"
result.additionalPaths = additionalPaths.mapIt(it.absolutePath.normalizePathUnix)
result.info = createInfo(path, result.additionalPaths)

result.loadDefaultIgnoreFile()

Expand Down

0 comments on commit c464801

Please sign in to comment.