[transformation] Add swp to ignored extensions in FileTransformationProvider (#3094)
Signed-off-by: Jan N. Klug <github@klug.nrw>pull/3095/head
parent
b808ea6d13
commit
6d6250eb63
|
@ -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(),
|
||||||
|
|
Loading…
Reference in New Issue