diff options
author | RandomChars <random@chars.jp> | 2021-09-28 12:36:54 +0900 |
---|---|---|
committer | RandomChars <random@chars.jp> | 2021-09-28 12:36:54 +0900 |
commit | ce3928f7e64d4b09d05f0bd1810266e30a1d710f (patch) | |
tree | 19f3a2a637b49531f4d03d290800f9f33702d9ba | |
parent | 2d2b8e1601587dbb6c4c41d5b1aa3342982f7f4f (diff) |
check for existing tag when taggingv1.2.8
-rw-r--r-- | store/image.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/store/image.go b/store/image.go index 42f5289..c4d3c40 100644 --- a/store/image.go +++ b/store/image.go @@ -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 } |