Skip to content

Commit

Permalink
chore: fixed some errors reported by nimalyzer
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 532e5340846af0744a472a319dea0f6a6d1386bfabdc9de6479baab607106a6e
  • Loading branch information
thindil committed Dec 28, 2024
1 parent 603bb80 commit 128ea43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/beastcleaner.nim
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ proc main() {.raises: [], tags: [ReadIOEffect, WriteIOEffect, ExecIOEffect,
open(filename = filesList, mode = fmWrite)
except IOError:
quit "Can't create file with list of all installed files"
var entries: seq[string]
var entries: seq[string] = @[]
try:
for entry in walkDirRec(dir = "/usr/local", yieldFilter = {pcFile, pcLinkToFile}):
entries.add(y = entry)
Expand All @@ -160,7 +160,7 @@ proc main() {.raises: [], tags: [ReadIOEffect, WriteIOEffect, ExecIOEffect,
for entry in entries:
try:
filesListFile.writeLine(x = entry)
except:
except IOError:
quit "Can't save data to file with list of all local files."
filesListFile.close()
echo "done."
Expand Down

0 comments on commit 128ea43

Please sign in to comment.