diff --git a/sentry-integration/src/main/kotlin/net/ntworld/sentryIntegration/entity/LocalPath.kt b/sentry-integration/src/main/kotlin/net/ntworld/sentryIntegration/entity/LocalPath.kt index 89c9264..1e249f9 100644 --- a/sentry-integration/src/main/kotlin/net/ntworld/sentryIntegration/entity/LocalPath.kt +++ b/sentry-integration/src/main/kotlin/net/ntworld/sentryIntegration/entity/LocalPath.kt @@ -27,6 +27,17 @@ data class LocalPath( sentryRootPath = sentryRootPath ) } + + if (sentryRootPath.startsWith("^")) { + pathRegex = sentryRootPath.toRegex() + if (path.contains(pathRegex)) { + return LocalPath( + originValue = input, + value = pathRegex.replace(path, ""), + sentryRootPath = sentryRootPath + ) + } + } return LocalPath( originValue = input, @@ -35,4 +46,4 @@ data class LocalPath( ) } } -} \ No newline at end of file +}