Get rid of annoying deprecation warnings (#164)
* Get rid of annoying deprecation warnings Changed existsFile to fileExists and existsDir to dirExists. * Install packages during nimble develop
This commit is contained in:
parent
40daae64e3
commit
24a037ad19
2 changed files with 4 additions and 4 deletions
|
|
@ -16,5 +16,5 @@ before_script:
|
||||||
- set -e
|
- set -e
|
||||||
- export PATH=$(pwd)/nim/bin:$(pwd):$PATH
|
- export PATH=$(pwd)/nim/bin:$(pwd):$PATH
|
||||||
script:
|
script:
|
||||||
- nimble develop
|
- nimble develop -y
|
||||||
- nim c -r tests/tester.nim
|
- nim c -r tests/tester.nim
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ proc sendStaticIfExists(
|
||||||
result = Http200
|
result = Http200
|
||||||
let mimes = newMimetypes()
|
let mimes = newMimetypes()
|
||||||
for p in paths:
|
for p in paths:
|
||||||
if existsFile(p):
|
if fileExists(p):
|
||||||
|
|
||||||
var fp = getFilePermissions(p)
|
var fp = getFilePermissions(p)
|
||||||
if not fp.contains(fpOthersRead):
|
if not fp.contains(fpOthersRead):
|
||||||
|
|
@ -107,7 +107,7 @@ proc handleFileRequest(
|
||||||
let pathDir = path.splitFile.dir / ""
|
let pathDir = path.splitFile.dir / ""
|
||||||
|
|
||||||
if pathDir.startsWith(publicUrl):
|
if pathDir.startsWith(publicUrl):
|
||||||
if existsDir(path):
|
if dirExists(path):
|
||||||
status = await sendStaticIfExists(
|
status = await sendStaticIfExists(
|
||||||
req,
|
req,
|
||||||
@[path / "index.html", path / "index.htm"]
|
@[path / "index.html", path / "index.htm"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue