forked from vieter-v/vieter
Added creation of files archive
This commit is contained in:
parent
2e344eecc7
commit
e26e2746de
4 changed files with 85 additions and 61 deletions
|
|
@ -76,16 +76,12 @@ fn (mut app App) put_package() web.Result {
|
|||
added := app.repo.add_from_path(pkg_path) or {
|
||||
app.lerror('Error while adding package: $err.msg')
|
||||
|
||||
os.rm(pkg_path) or {
|
||||
app.lerror("Failed to remove download '$pkg_path'.")
|
||||
}
|
||||
os.rm(pkg_path) or { app.lerror("Failed to remove download '$pkg_path'.") }
|
||||
|
||||
return app.text('Failed to add package.')
|
||||
}
|
||||
if !added {
|
||||
os.rm(pkg_path) or {
|
||||
app.lerror("Failed to remove download '$pkg_path'.")
|
||||
}
|
||||
os.rm(pkg_path) or { app.lerror("Failed to remove download '$pkg_path'.") }
|
||||
|
||||
app.lwarn('Duplicate package.')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue