aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Shirley-Quirk2020-08-04 21:55:59 +0000
committerBenjamin Shirley-Quirk2020-08-04 21:55:59 +0000
commitb8d35dea8fb61ec177ab898b70404338f2ed477b (patch)
tree57574095014c34825f7ec0943944e156793742e4
parent8ca6a6ae081fa6381e79b43d1363e5e5ce00c9ba (diff)
dirExists -> existsDir
-rw-r--r--src/common.nim6
-rw-r--r--src/feature/syncclean.nim2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common.nim b/src/common.nim
index 6b15b4c..8dc41c8 100644
--- a/src/common.nim
+++ b/src/common.nim
@@ -527,7 +527,7 @@ proc cloneBareRepo(config: Config, bareKind: BareKind, bareName: string,
if forkWait(() => (block:
if not dropPrivileges or dropPrivileges():
- if existsDir(repoPath):
+ if dirExists(repoPath):
let branch = branchOption.get("master")
execResult(gitCmd, "-C", repoPath, "fetch", "-q", "--no-tags",
"origin", branch & ":" & branch)
@@ -724,7 +724,7 @@ proc cloneAurRepo*(config: Config, base: string, gitUrl: string,
if message.isSome:
(1, message)
- elif repoPath.existsDir():
+ elif repoPath.dirExists():
(0, none(string))
else:
let fullName = bareFullName(BareKind.pkg, base)
@@ -733,7 +733,7 @@ proc cloneAurRepo*(config: Config, base: string, gitUrl: string,
let cloneBareCode = forkWait(() => (block:
if not dropPrivileges or dropPrivileges():
- if existsDir(bareRepoPath):
+ if dirExists(bareRepoPath):
execResult(gitCmd, "-C", bareRepoPath, "fetch", "-q", "--no-tags",
"origin", "master:master")
else:
diff --git a/src/feature/syncclean.nim b/src/feature/syncclean.nim
index 6b1f853..ad0c255 100644
--- a/src/feature/syncclean.nim
+++ b/src/feature/syncclean.nim
@@ -31,7 +31,7 @@ proc handleSyncClean*(args: seq[Argument], config: Config): int =
else:
echo(tr"removing all package repositories...")
- if existsDir(reposCacheDir):
+ if dirExists(reposCacheDir):
withAlpmConfig(config, false, handle, dbs, errors):
for e in errors: printError(config.color, e)