[transformation] Add swp to ignored extensions in FileTransformationProvider (#3094)

Signed-off-by: Jan N. Klug <github@klug.nrw>
pull/3095/head
J-N-K 2022-09-27 18:32:19 +02:00 committed by GitHub
parent b808ea6d13
commit 6d6250eb63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
public class FileTransformationProvider extends AbstractWatchService implements TransformationProvider { public class FileTransformationProvider extends AbstractWatchService implements TransformationProvider {
private static final WatchEvent.Kind<?>[] WATCH_EVENTS = { StandardWatchEventKinds.ENTRY_CREATE, private static final WatchEvent.Kind<?>[] WATCH_EVENTS = { StandardWatchEventKinds.ENTRY_CREATE,
StandardWatchEventKinds.ENTRY_DELETE, StandardWatchEventKinds.ENTRY_MODIFY }; StandardWatchEventKinds.ENTRY_DELETE, StandardWatchEventKinds.ENTRY_MODIFY };
private static final Set<String> IGNORED_EXTENSIONS = Set.of("txt"); private static final Set<String> IGNORED_EXTENSIONS = Set.of("txt", "swp");
private static final Pattern FILENAME_PATTERN = Pattern private static final Pattern FILENAME_PATTERN = Pattern
.compile("(?<filename>.+?)(_(?<language>[a-z]{2}))?\\.(?<extension>[^.]*)$"); .compile("(?<filename>.+?)(_(?<language>[a-z]{2}))?\\.(?<extension>[^.]*)$");
private static final Path TRANSFORMATION_PATH = Path.of(OpenHAB.getConfigFolder(), private static final Path TRANSFORMATION_PATH = Path.of(OpenHAB.getConfigFolder(),