Browse Source

ignore dot underscore files (#1259)

pull/1261/head
Jason Dove 3 years ago committed by GitHub
parent
commit
c0656114b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 6
      ErsatzTV.Core/Metadata/LocalFileSystem.cs

1
CHANGELOG.md

@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Certain multi-collection scenarios may still include duplicates across multiple collections - Certain multi-collection scenarios may still include duplicates across multiple collections
- Use autocomplete fields for collection searching in schedule items editor - Use autocomplete fields for collection searching in schedule items editor
- This greatly improves the editor performance - This greatly improves the editor performance
- Ignore dot underscore files
## [0.7.7-beta] - 2023-04-07 ## [0.7.7-beta] - 2023-04-07
### Added ### Added

6
ErsatzTV.Core/Metadata/LocalFileSystem.cs

@ -76,7 +76,8 @@ public class LocalFileSystem : ILocalFileSystem
{ {
try try
{ {
return Directory.EnumerateFiles(folder, "*", SearchOption.TopDirectoryOnly); return Directory.EnumerateFiles(folder, "*", SearchOption.TopDirectoryOnly)
.Where(path => !path.StartsWith("._"));
} }
catch (UnauthorizedAccessException) catch (UnauthorizedAccessException)
{ {
@ -98,7 +99,8 @@ public class LocalFileSystem : ILocalFileSystem
{ {
try try
{ {
return Directory.EnumerateFiles(folder, searchPattern, SearchOption.TopDirectoryOnly); return Directory.EnumerateFiles(folder, searchPattern, SearchOption.TopDirectoryOnly)
.Where(path => !path.StartsWith("._"));
} }
catch (UnauthorizedAccessException) catch (UnauthorizedAccessException)
{ {

Loading…
Cancel
Save