diff options
author | Gabe Kangas <gabek@real-ity.com> | 2021-05-14 15:28:13 -0700 |
---|---|---|
committer | Gabe Kangas <gabek@real-ity.com> | 2021-05-14 15:28:13 -0700 |
commit | 3810ce4f63ecf7fb7a35c564af68f081c7e8b537 (patch) | |
tree | 28e262f00bfe02b461d6f896cbc4881a50e60453 | |
parent | 5c48ead5185572cc1af1a80d55dbfde3a2c67265 (diff) |
Do not try to copy logo if image does not exist on diskv0.0.7
-rwxr-xr-x | build/release/build.sh | 2 | ||||
-rw-r--r-- | core/core.go | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/build/release/build.sh b/build/release/build.sh index 5fe9fd794..a4fc2fc07 100755 --- a/build/release/build.sh +++ b/build/release/build.sh @@ -116,4 +116,4 @@ docker build --build-arg NAME=docker --build-arg VERSION=${VERSION} --build-arg # Dockerhub # You must be authenticated via `docker login` with your Dockerhub credentials first. -docker push gabekangas/owncast +docker push "gabekangas/owncast:${VERSION}" diff --git a/core/core.go b/core/core.go index 4e6dcd5fa..458dc2375 100644 --- a/core/core.go +++ b/core/core.go @@ -129,12 +129,11 @@ func resetDirectories() { } // Remove the previous thumbnail - os.Remove(filepath.Join(config.WebRoot, "thumbnail.jpg")) - - // Remove the previous thumbnail logo := data.GetLogoPath() - err = utils.Copy(path.Join("data", logo), "webroot/thumbnail.jpg") - if err != nil { - log.Warnln(err) + if utils.DoesFileExists(logo) { + err = utils.Copy(path.Join("data", logo), filepath.Join(config.WebRoot, "thumbnail.jpg")) + if err != nil { + log.Warnln(err) + } } } |