Skip to content

Commit e6fae90

Browse files
committed
Linux hack
1 parent 79954b4 commit e6fae90

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/dotnet-watch.Tests/FileWatcherTests.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ public async Task NewFileInNewDirectory(bool usePolling, bool nested)
9999
{
100100
var dir = _testAssetManager.CreateTestDirectory(identifier: usePolling.ToString()).Path;
101101

102+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
103+
{
104+
Directory.CreateDirectory(Path.Combine(dir, ".dummy"));
105+
}
106+
102107
var dir1 = Path.Combine(dir, "dir1");
103108
var dir2 = nested ? Path.Combine(dir1, "dir2") : dir1;
104109
var fileInSubdir = Path.Combine(dir2, "file_in_subdir");
@@ -120,7 +125,12 @@ await TestOperation(
120125
() =>
121126
{
122127
Directory.CreateDirectory(dir1);
123-
Directory.CreateDirectory(dir2);
128+
129+
if (nested)
130+
{
131+
Directory.CreateDirectory(dir2);
132+
}
133+
124134
File.WriteAllText(fileInSubdir, string.Empty);
125135
});
126136
}

0 commit comments

Comments
 (0)