[ 
https://issues.apache.org/jira/browse/NIFI-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16622472#comment-16622472
 ] 

ASF GitHub Bot commented on NIFI-5560:
--------------------------------------

Github user hemantha-kumara commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3000#discussion_r219269070
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java
 ---
    @@ -263,6 +265,16 @@ public String getHomeDirectory(final FlowFile 
flowFile) throws IOException {
                     }
                 }
     
    +            // if is a link and we're supposed to follow symlink
    +            if (symlink && file.isSymbolicLink()) {
    +                try {
    +                    listing.addAll(getListing(newFullForwardPath, depth + 
1, maxResults - count));
    +                } catch (final IOException e) {
    +                    logger.error("Unable to get listing from " + 
newFullForwardPath + "; skipping this symlink", e);
    +                }
    +            }
    +
    +
    --- End diff --
    
    Submitted changes with latest commit 
52a3432e3b0ad379d63386e4c4b554db35b1e2a3 


> Sub directory(symbolic link to directory) files are not getting listed in 
> ListSFTP(ListSFTP does not Follow symbolic links)
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-5560
>                 URL: https://issues.apache.org/jira/browse/NIFI-5560
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Hemantha kumara M S
>            Assignee: Hemantha kumara M S
>            Priority: Major
>
> *Here is the configuration*
> ----
> *SFTP Server side:*
> -bash-4.2$ mkdir -p /tmp/testData
>  -bash-4.2$
>  -bash-4.2$ mkdir -p /tmp/toRead
>  -bash-4.2$ ln -s /tmp/testData /tmp/toRead/data1
>  -bash-4.2$ touch /tmp/testData/1.txt
>  -bash-4.2$ touch /tmp/testData/2.txt
>  -bash-4.2$ touch /tmp/toRead/t.txt
> -bash-4.2$ mkdir /tmp/toRead/data2
> -bash-4.2$ touch /tmp/toRead/data2/22.txt
> -bash-4.2$ cd /tmp/toRead/
> -bash-4.2$ tree
> .
> ├── data1 -> /tmp/testData
> ├── data2
> │   └── 22.txt
> └── t.txt
> 2 directories, 2 files
> -bash-4.2$ pwd
> /tmp/toRead
> -bash-4.2$ tree
> .
> ├── data1 -> /tmp/testData
> ├── data2
> │   └── 22.txt
> └── t.txt
> 2 directories, 2 files
> -bash-4.2$ touch data
> data1/ data2/
> -bash-4.2$ touch data2/22.txt
> -bash-4.2$ touch t.txt
> -bash-4.2$ tree /tmp/testData
> /tmp/testData
> ├── 1.txt
> └── 2.txt
> 0 directories, 2 files
>  
> *Nifi:*
> Configured ListSFTP  +Remote Path+ to +/tmp/toRead/+ and +Search Recursively+ 
> to +true+
>   
> *+Expected result:+*
> Should list 4 files(1.txt, 2.txt, t.txt, data2/22.txt)
> *+Actual result:+*
> listed only two files(t.txt, data2/22.txt)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to