From b8d35dea8fb61ec177ab898b70404338f2ed477b Mon Sep 17 00:00:00 2001 From: Benjamin Shirley-Quirk Date: Tue, 4 Aug 2020 22:55:59 +0100 Subject: dirExists -> existsDir --- src/common.nim | 6 +++--- src/feature/syncclean.nim | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-70-g09d2