mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 06:12:23 +03:00
Do not try to copy logo if image does not exist on disk
This commit is contained in:
parent
5c48ead518
commit
3810ce4f63
2 changed files with 6 additions and 7 deletions
|
@ -116,4 +116,4 @@ docker build --build-arg NAME=docker --build-arg VERSION=${VERSION} --build-arg
|
||||||
|
|
||||||
# Dockerhub
|
# Dockerhub
|
||||||
# You must be authenticated via `docker login` with your Dockerhub credentials first.
|
# You must be authenticated via `docker login` with your Dockerhub credentials first.
|
||||||
docker push gabekangas/owncast
|
docker push "gabekangas/owncast:${VERSION}"
|
||||||
|
|
11
core/core.go
11
core/core.go
|
@ -128,13 +128,12 @@ func resetDirectories() {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the previous thumbnail
|
|
||||||
os.Remove(filepath.Join(config.WebRoot, "thumbnail.jpg"))
|
|
||||||
|
|
||||||
// Remove the previous thumbnail
|
// Remove the previous thumbnail
|
||||||
logo := data.GetLogoPath()
|
logo := data.GetLogoPath()
|
||||||
err = utils.Copy(path.Join("data", logo), "webroot/thumbnail.jpg")
|
if utils.DoesFileExists(logo) {
|
||||||
if err != nil {
|
err = utils.Copy(path.Join("data", logo), filepath.Join(config.WebRoot, "thumbnail.jpg"))
|
||||||
log.Warnln(err)
|
if err != nil {
|
||||||
|
log.Warnln(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue