Skip to content

Commit

Permalink
Merge pull request #2386 from WithoutPants/hotfix-0.13.1
Browse files Browse the repository at this point in the history
Hotfix 0.13.1
  • Loading branch information
WithoutPants authored Mar 15, 2022
2 parents 7404265 + bd917fd commit 2b5c5f2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
11 changes: 3 additions & 8 deletions pkg/match/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/stashapp/stash/pkg/image"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/scene"
"github.com/stashapp/stash/pkg/utils"
)

const (
Expand Down Expand Up @@ -67,7 +68,7 @@ func getPathWords(path string) []string {
// just use the first two characters
// #2293 - need to convert to unicode runes for the substring, otherwise
// the resulting string is corrupted.
ret = append(ret, string([]rune(w)[0:2]))
ret = utils.StrAppendUnique(ret, string([]rune(w)[0:2]))
}
}

Expand All @@ -90,13 +91,7 @@ func nameMatchesPath(name, path string) int {
// #2363 - optimisation: only use unicode character regexp if path contains
// unicode characters
re := nameToRegexp(name, !allASCII(path))
found := re.FindAllStringIndex(path, -1)

if found == nil {
return -1
}

return found[len(found)-1][0]
return regexpMatchesPath(re, path)
}

// nameToRegexp compiles a regexp pattern to match paths from the given name.
Expand Down
6 changes: 6 additions & 0 deletions pkg/match/path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ func Test_nameMatchesPath(t *testing.T) {
"before_first last/after",
6,
},
{
"within string case insensitive",
name,
"before FIRST last/after",
6,
},
{
"not within string",
name,
Expand Down
11 changes: 9 additions & 2 deletions ui/v2.5/src/components/Changelog/Changelog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import V0100 from "./versions/v0100.md";
import V0110 from "./versions/v0110.md";
import V0120 from "./versions/v0120.md";
import V0130 from "./versions/v0130.md";
import V0131 from "./versions/v0131.md";
import { MarkdownPage } from "../Shared/MarkdownPage";

// to avoid use of explicit any
Expand Down Expand Up @@ -54,9 +55,9 @@ const Changelog: React.FC = () => {
// after new release:
// add entry to releases, using the current* fields
// then update the current fields.
const currentVersion = stashVersion || "v0.13.0";
const currentVersion = stashVersion || "v0.13.1";
const currentDate = buildDate;
const currentPage = V0130;
const currentPage = V0131;

const releases: IStashRelease[] = [
{
Expand All @@ -65,6 +66,12 @@ const Changelog: React.FC = () => {
page: currentPage,
defaultOpen: true,
},
{
version: "v0.13.0",
date: "2022-03-08",
page: V0130,
defaultOpen: true,
},
{
version: "v0.12.0",
date: "2021-12-29",
Expand Down
2 changes: 2 additions & 0 deletions ui/v2.5/src/components/Changelog/versions/v0131.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### 🐛 Bug fixes
* Fix auto-tag not using case-insensitive matching. ([#2378](https://github.com/stashapp/stash/pull/2378))

0 comments on commit 2b5c5f2

Please sign in to comment.