This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git

commit d07d1270adda178a694acb88ee035ee7996ef083
Author: Robert Munteanu <[email protected]>
AuthorDate: Thu Apr 19 17:32:21 2018 +0300

    SLING-7587 - Create a CLI-only tool to sync content
    
    cli: ignore IntelliJ safe write temporary files.
---
 .../sling/ide/content/sync/fs/impl/FSWorkspaceResource.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git 
a/shared/modules/sync-fs/src/main/java/org/apache/sling/ide/content/sync/fs/impl/FSWorkspaceResource.java
 
b/shared/modules/sync-fs/src/main/java/org/apache/sling/ide/content/sync/fs/impl/FSWorkspaceResource.java
index cb14004..77685f7 100644
--- 
a/shared/modules/sync-fs/src/main/java/org/apache/sling/ide/content/sync/fs/impl/FSWorkspaceResource.java
+++ 
b/shared/modules/sync-fs/src/main/java/org/apache/sling/ide/content/sync/fs/impl/FSWorkspaceResource.java
@@ -18,6 +18,8 @@ package org.apache.sling.ide.content.sync.fs.impl;
 
 import java.io.File;
 import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Objects;
 
 import org.apache.sling.ide.sync.content.WorkspacePath;
@@ -27,6 +29,12 @@ import org.apache.sling.ide.sync.content.WorkspaceResource;
 
 public abstract class FSWorkspaceResource implements WorkspaceResource {
     
+    private static final List<String> DEFAULT_IGNORE_SUFFIXES = new 
ArrayList<>();
+    static {
+        DEFAULT_IGNORE_SUFFIXES.add("___jb_tmp___"); // IntelliJ safe write
+        DEFAULT_IGNORE_SUFFIXES.add("___jb_old___"); // IntelliJ safe write
+    }
+
     static WorkspacePath getPath(WorkspaceProject project, File file){
         return 
WorkspacePaths.fromOsPath(project.getOSPath().getParent().relativize(file.toPath())).absolute();
     }
@@ -58,6 +66,9 @@ public abstract class FSWorkspaceResource implements 
WorkspaceResource {
 
     @Override
     public boolean isIgnored() {
+        for ( String ignore : DEFAULT_IGNORE_SUFFIXES)
+            if ( getName().endsWith(ignore))
+                return true;
         return false;
     }
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to