diff --git a/src/ReportPortal.Shared/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsEventsObserver.cs b/src/ReportPortal.Shared/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsEventsObserver.cs index 60206cf..d9b4ae2 100644 --- a/src/ReportPortal.Shared/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsEventsObserver.cs +++ b/src/ReportPortal.Shared/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsEventsObserver.cs @@ -27,7 +27,7 @@ private void ReportEventsSource_OnBeforeLaunchFinishing(Reporter.ILaunchReporter { foreach (var filePattern in artifactPaths) { - var artifacts = Directory.GetFiles(BaseDirectory, filePattern); + var artifacts = Directory.GetFiles(BaseDirectory, filePattern.Trim()); foreach (var artifact in artifacts) { diff --git a/test/ReportPortal.Shared.Tests/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsTest.cs b/test/ReportPortal.Shared.Tests/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsTest.cs index 0fb5f91..945bb88 100644 --- a/test/ReportPortal.Shared.Tests/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsTest.cs +++ b/test/ReportPortal.Shared.Tests/Extensibility/Embedded/LaunchArtifacts/LaunchArtifactsTest.cs @@ -44,7 +44,7 @@ public void ShouldAttachSingleArtifactByPath() .Callback((a, b) => request = a); var config = new ConfigurationBuilder().Build(); - config.Properties["launch:artifacts"] = "test_file_1.txt"; + config.Properties["launch:artifacts"] = " test_file_1.txt "; var launchReporter = new LaunchReporterBuilder(client.Object).With(_extensionManager).WithConfiguration(config).Build(1, 0, 0); launchReporter.Sync();