summaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/storage/pkg/fileutils
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-02-03 09:16:41 +0000
committerValentin Rothberg <rothberg@redhat.com>2020-02-03 13:51:31 +0100
commit94453c85c78908096764f8c0cb4cf72a470c182b (patch)
tree969f0921dedcdbc8c56a80e6679fbd70c3854aa4 /vendor/github.com/containers/storage/pkg/fileutils
parent4699d5e02d3270b5cc89f7528b53b823fbf88796 (diff)
build(deps): bump github.com/containers/storage from 1.15.7 to 1.15.8
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.7 to 1.15.8. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.15.7...v1.15.8) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/containers/storage/pkg/fileutils')
-rw-r--r--vendor/github.com/containers/storage/pkg/fileutils/fileutils.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go b/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go
index 388eaf9d5..dc2e0c199 100644
--- a/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go
+++ b/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go
@@ -226,8 +226,9 @@ func (p *Pattern) compile() error {
sl := string(os.PathSeparator)
escSL := sl
- if sl == `\` {
- escSL += `\`
+ const bs = `\`
+ if sl == bs {
+ escSL += bs
}
for scan.Peek() != scanner.EOF {
@@ -262,11 +263,11 @@ func (p *Pattern) compile() error {
} else if ch == '.' || ch == '$' {
// Escape some regexp special chars that have no meaning
// in golang's filepath.Match
- regStr += `\` + string(ch)
+ regStr += bs + string(ch)
} else if ch == '\\' {
// escape next char. Note that a trailing \ in the pattern
// will be left alone (but need to escape it)
- if sl == `\` {
+ if sl == bs {
// On windows map "\" to "\\", meaning an escaped backslash,
// and then just continue because filepath.Match on
// Windows doesn't allow escaping at all
@@ -274,9 +275,9 @@ func (p *Pattern) compile() error {
continue
}
if scan.Peek() != scanner.EOF {
- regStr += `\` + string(scan.Next())
+ regStr += bs + string(scan.Next())
} else {
- regStr += `\`
+ regStr += bs
}
} else {
regStr += string(ch)