Skip to content
Snippets Groups Projects
Commit ce3928f7 authored by Ophestra's avatar Ophestra
Browse files

check for existing tag when tagging

parent 2d2b8e16
No related branches found
Tags v1.2.8
No related merge requests found
......@@ -439,7 +439,8 @@ func (s *Store) ImageDestroy(hash string) {
// ImageTagAdd adds a tag to an image with specific snowflake.
func (s *Store) ImageTagAdd(flake, tag string) {
if !nameRegex.MatchString(tag) || !s.flake(flake) || !s.dir(s.ImageTagsPath(flake)) || !s.dir(s.TagPath(tag)) {
if !nameRegex.MatchString(tag) || !s.flake(flake) || !s.dir(s.ImageTagsPath(flake)) || !s.dir(s.TagPath(tag)) ||
s.file(s.TagPath(tag)+"/"+flake) {
return
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment