Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/choosenim.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) Dominik Picheta. All rights reserved.
# BSD-3-Clause License. Look at license.txt for more info.
import os, strutils, algorithm
import std/[os, strutils, algorithm]

import nimblepkg/[cli, version]
import nimblepkg/common as nimbleCommon
Expand Down Expand Up @@ -94,11 +94,11 @@ proc chooseVersion(version: string, params: CliParams) =
removeDir(tempDir)
createDir(tempDir)
extract(path, tempDir)
createDir(binDir)
for kind, path in walkDir(tempDir, relative = true):
if kind == pcFile:
try:
if not fileExists(binDir / path) or
getLastModificationTime(binDir / path) < getLastModificationTime(tempDir / path):
if not fileExists(binDir / path) or fileNewer(tempDir / path, binDir / path):
moveFile(tempDir / path, binDir / path)
display("Info:", "Copied '$1' to '$2'" % [path, binDir], priority = HighPriority)
except:
Expand Down