-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GH-9453: Correct separator when checking smb path #9454
Conversation
@pfosser Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@pfosser This Pull Request contains an obvious fix. Signing the Contributor License Agreement is not necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add your name to the @author
list of that affected class.
Thanks
import org.springframework.core.log.LogAccessor; | ||
import org.springframework.integration.file.remote.session.Session; | ||
import org.springframework.util.Assert; | ||
import org.springframework.util.FileCopyUtils; | ||
import org.springframework.util.StringUtils; | ||
|
||
import jcifs.smb.SmbException; | ||
import jcifs.smb.SmbFile; | ||
import jcifs.smb.SmbFileOutputStream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct change.
Please, consider to revert imports order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build fails clearly with that import order problem:
Error: eckstyle] [ERROR] /home/runner/work/spring-integration/spring-integration/spring-integration-smb/src/main/java/org/springframework/integration/smb/session/SmbSession.java:34:1: Wrong order for 'jcifs.smb.SmbException' import. [ImportOrder]
Consider to run ./gradlew :spring-integration-smb:check
before pushing changes to the PR.
Thanks
Fixes: spring-projects#9453 Issue link: spring-projects#9453 On a smb file upload, to detect the need for new remote directories, the remote path was checked for the local filesystem path separator. On Windows that is \\ which is never found in a smb path, so the necessary remote path was not created and the operation failed. Use the correct separator which was already available as a constant.
@pfosser , thank you for contribution; looking forward for more! |
Fixes: #9453
Issue link: #9453
On a smb file upload, to detect the need for new remote directories, the remote path was checked for the local filesystem path separator. On Windows that is \ which is never found in a smb path, so the necessary remote path was not created and the operation failed.
Use the correct separator which was already available as a constant.
@pivotal-cla This is an Obvious Fix