diff --git a/src/NzbDrone.Common/Instrumentation/Sentry/SentryCleanser.cs b/src/NzbDrone.Common/Instrumentation/Sentry/SentryCleanser.cs
index 96a6df420..d96958ec5 100644
--- a/src/NzbDrone.Common/Instrumentation/Sentry/SentryCleanser.cs
+++ b/src/NzbDrone.Common/Instrumentation/Sentry/SentryCleanser.cs
@@ -66,15 +66,20 @@ namespace NzbDrone.Common.Instrumentation.Sentry
return null;
}
- var rootDir = OsInfo.IsWindows ? "\\src\\" : "/src/";
- var index = path.IndexOf(rootDir, StringComparison.Ordinal);
-
- if (index <= 0)
+ // the paths in the stacktrace depend on where it was compiled,
+ // not the current OS
+ var rootDirs = new [] { "\\src\\", "/src/" };
+ foreach (var rootDir in rootDirs)
{
- return path;
+ var index = path.IndexOf(rootDir, StringComparison.Ordinal);
+
+ if (index > 0)
+ {
+ return path.Substring(index + rootDir.Length - 1);
+ }
}
- return path.Substring(index + rootDir.Length - 1);
+ return path;
}
}
}
diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj
index f7a3ea5e6..05e2a0eaf 100644
--- a/src/NzbDrone.Common/NzbDrone.Common.csproj
+++ b/src/NzbDrone.Common/NzbDrone.Common.csproj
@@ -57,8 +57,8 @@
..\packages\Sentry.1.1.2\lib\net461\Sentry.dll
-
- ..\packages\Sentry.Protocol.1.0.4\lib\net46\Sentry.Protocol.dll
+
+ ..\packages\Sentry.Protocol.1.0.3\lib\net46\Sentry.Protocol.dll
..\packages\Sentry.PlatformAbstractions.1.0.0\lib\net45\Sentry.PlatformAbstractions.dll
diff --git a/src/NzbDrone.Common/packages.config b/src/NzbDrone.Common/packages.config
index 0b18b0846..56cd6e4e1 100644
--- a/src/NzbDrone.Common/packages.config
+++ b/src/NzbDrone.Common/packages.config
@@ -6,6 +6,6 @@
-
+