Skip to content

Commit

Permalink
Replace string concatenation with interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
manio143 committed Oct 10, 2022
1 parent 84b3228 commit 3e25de4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static Regex CreateRegexForFileSearch(string url, string searchPattern, V
url = Regex.Escape(url);
searchPattern = Regex.Escape(searchPattern).Replace(@"\*", "[^/]*").Replace(@"\?", "[^/]");
string recursivePattern = searchOption == VirtualSearchOption.AllDirectories ? "(.*/)*" : "/?";
return new Regex("^" + url + recursivePattern + searchPattern + "$");
return new Regex($"^{url}{recursivePattern}{searchPattern}$");
}

private abstract class DatabaseFileStream : VirtualFileStream, IDatabaseStream
Expand Down

0 comments on commit 3e25de4

Please sign in to comment.