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

feat: add support for file path #1141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohit-marathe
Copy link

Fixes: #1039

Copy link

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

Signed-off-by: Mohit Marathe <mohitmarathe@proton.me>
@mohit-marathe
Copy link
Author

@kmehant @HarikrishnanBalagopal Please review this PR!

@kmehant kmehant requested a review from seshapad February 1, 2024 18:13
Copy link
Contributor

@HarikrishnanBalagopal HarikrishnanBalagopal left a comment

Choose a reason for hiding this comment

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

@kmehant have we tested this with both Docker and Podman?

for sp, dp := range paths {
err = copyDirToContainer(e.ctx, e.cli, containerID, sp, dp)
fi, err := os.Stat(sp)
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indentation. Use go fmt.
If you are using a text editor like VSCode, VIM, Sublime, etc. installing the Golang extension automatically runs the go formatter when you save the file.

}
} else {
newDestPath := filepath.Join(dp, fi.Name())
err = copyDirToContainer(e.ctx, e.cli, containerID, sp, newDestPath)
Copy link
Contributor

Choose a reason for hiding this comment

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

If copyDirToContainer is being used to copy files then we should rename it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support file paths for Upload and Download for peer containers
2 participants