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

Fix last_path generation logic #15

Merged
merged 1 commit into from
Sep 12, 2016
Merged

Conversation

sakama
Copy link
Contributor

@sakama sakama commented Sep 6, 2016

I found that current implementation fails to generate last_path with following condition.

  • auth method is password
  • password contains special characters like '#'

@sakama sakama force-pushed the fix-last-path-generation-logic branch 4 times, most recently from 035528c to 37f40cc Compare September 9, 2016 10:15
control.run(taskSource, taskCount);

ConfigDiff configDiff = Exec.newConfigDiff();
if (task.getIncremental()) {
configDiff.set("last_path", SftpFileInput.getRelativePath(task.getFiles().getLastPath(task.getLastPath())));
configDiff.set("last_path", lastPath);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When getRelativePath returns null, the plugin should not return {"last_path": null}. It should return empty config_diff.

if (task.getIncremental() && lastPath != null) {
    configDiff.set("last_path", lastPath);
}

?

@sakama sakama force-pushed the fix-last-path-generation-logic branch from 37f40cc to eb03570 Compare September 12, 2016 05:59
@muga
Copy link

muga commented Sep 12, 2016

LGTM

@sakama sakama merged commit 2e9faf8 into master Sep 12, 2016
@sakama sakama deleted the fix-last-path-generation-logic branch September 12, 2016 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants