Code more cleaner
This commit is contained in:
parent
fa3545c092
commit
d526e051c5
1 changed files with 1 additions and 4 deletions
|
|
@ -57,10 +57,7 @@ proc addFile*(z: var TZipArchive, dest, src: string) =
|
||||||
## may contain a path that will be created.
|
## may contain a path that will be created.
|
||||||
assert(z.mode != fmRead)
|
assert(z.mode != fmRead)
|
||||||
if not fileExists(src):
|
if not fileExists(src):
|
||||||
var e: ref EIO
|
raise newException(EIO, "File '" & src & "' does not exist")
|
||||||
new(e)
|
|
||||||
e.msg = "File does not exist"
|
|
||||||
raise e
|
|
||||||
var zipsrc = zip_source_file(z.w, src, 0, -1)
|
var zipsrc = zip_source_file(z.w, src, 0, -1)
|
||||||
if zipsrc == nil:
|
if zipsrc == nil:
|
||||||
#echo("Dest: " & dest)
|
#echo("Dest: " & dest)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue