Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[File Connector][moveFolder]It replaces the destination folder content #1457

Open
isuruuy429 opened this issue Apr 23, 2020 · 0 comments
Open

Comments

@isuruuy429
Copy link
Contributor

isuruuy429 commented Apr 23, 2020

Description:
When we want to move a source folder to the destination folder, it replaces all the content in the destination folder and move the content in the source folder, but not the folder.
It first deletes all the content in the destination folder. Then tries to move whatever the content in the source folder.

Steps to reproduce:

  1. Create the following API in the Integration Studio.
<?xml version="1.0" encoding="UTF-8"?>
<api context="/file" name="File" xmlns="http://ws.apache.org/ns/synapse">
  <resource methods="POST" uri-template="/move">
        <inSequence>
            <property expression="json-eval($.source)" name="source" scope="default" type="STRING"/>
            <property expression="json-eval($.destination)" name="destination" scope="default" type="STRING"/>
            <fileconnector.move>
                <source>{$ctx:source}</source>
                <destination>{$ctx:destination}</destination>
            </fileconnector.move>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>
  1. Invoke the API with a relevant payload as below.
{
	"source":"/Users/IsuruUyanage/Music/integration-tests",
	"destination":"/Users/IsuruUyanage/Music/iTunes"
}

Expected: It is expected to move the integration tests folder to the iTunes folder without replacing anything.
Actual: It replaces all the files in the iTunes folder and just moves the content of the integration-tests to the iTunes folder. Not the whole integration-tests folder.

@isuruuy429 isuruuy429 changed the title [File Connector][move]It replaces the destination folder content [File Connector][moveFolder]It replaces the destination folder content Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant