GH-177: Create SMB files only in the SHARE_READ
Fixes spring-projects/spring-integration-extensions#177 * To avoid partial read, when other process may open the file and start to write, it would be better to open SMB files in the `FILE_SHARE_READ` mode. This way only one process can write the file, when all of them can read it
This commit is contained in:
@@ -458,7 +458,7 @@ public class SmbSession implements Session<SmbFile> {
|
||||
return this.smbShare;
|
||||
}
|
||||
|
||||
SmbFile smbFile = new SmbFile(this.smbShare, cleanedPath);
|
||||
SmbFile smbFile = new SmbFile(this.smbShare, cleanedPath, SmbFile.FILE_SHARE_READ);
|
||||
|
||||
boolean appendFileSeparator = !cleanedPath.endsWith(SMB_FILE_SEPARATOR);
|
||||
if (appendFileSeparator) {
|
||||
|
||||
Reference in New Issue
Block a user