Skip to content

Commit 13a9e1f

Browse files
committed
fix leanringtransport directory check
1 parent 0d0aa34 commit 13a9e1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/NServiceBus.Core/Transports/Learning/LearningTransportInfrastructure.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class LearningTransportInfrastructure : TransportInfrastructure
1616
public LearningTransportInfrastructure(SettingsHolder settings)
1717
{
1818
this.settings = settings;
19-
2019
if (!settings.TryGet(StorageLocationKey, out storagePath))
2120
{
2221
storagePath = FindStoragePath();
@@ -56,9 +55,10 @@ static string FindStoragePath()
5655

5756
// When no solution file was found try to find a learning transport directory
5857
// don't ignore casing due to linux support
59-
if (Directory.EnumerateDirectories(directory).Any(dir => dir.Equals(DefaultLearningTransportDirectory, StringComparison.Ordinal)))
58+
var learningTransportDirectory = Path.Combine(directory, DefaultLearningTransportDirectory);
59+
if (Directory.Exists(learningTransportDirectory))
6060
{
61-
return Path.Combine(directory, DefaultLearningTransportDirectory);
61+
return learningTransportDirectory;
6262
}
6363

6464
var parent = Directory.GetParent(directory);

0 commit comments

Comments
 (0)