-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Make Extensions.FileProviders supported in browser and only unsupport FSW usage #56189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,7 +161,13 @@ internal PhysicalFilesWatcher CreateFileWatcher() | |
| string root = PathUtils.EnsureTrailingSlash(Path.GetFullPath(Root)); | ||
|
|
||
| // When both UsePollingFileWatcher & UseActivePolling are set, we won't use a FileSystemWatcher. | ||
| FileSystemWatcher watcher = UsePollingFileWatcher && UseActivePolling ? null : new FileSystemWatcher(root); | ||
| FileSystemWatcher watcher = UsePollingFileWatcher && UseActivePolling ? null : | ||
| #if NETCOREAPP | ||
| OperatingSystem.IsBrowser() ? throw new PlatformNotSupportedException(SR.Format(SR.FileSystemWatcher_PlatformNotSupported, typeof(FileSystemWatcher))) : new FileSystemWatcher(root); | ||
| #else | ||
|
Comment on lines
+164
to
+167
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this still throw PNSE when creating a (UsePollingFileWatcher && UseActivePolling) || OperatingSystem.IsBrowser() ? null : ...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see, so we should always fallback to use polling on browser. That makes sense to me.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| new FileSystemWatcher(root); | ||
| #endif | ||
|
|
||
| return new PhysicalFilesWatcher(root, watcher, UsePollingFileWatcher, _filters) | ||
| { | ||
| UseActivePolling = UseActivePolling, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.