Skip to content

Commit

Permalink
truncate existing files on sftp write
Browse files Browse the repository at this point in the history
  • Loading branch information
rmynar authored and JacobCallahan committed Feb 15, 2024
1 parent 2cad77d commit 0767e25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion broker/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
| ssh2_sftp.LIBSSH2_SFTP_S_IRGRP
| ssh2_sftp.LIBSSH2_SFTP_S_IROTH
)
FILE_FLAGS = ssh2_sftp.LIBSSH2_FXF_CREAT | ssh2_sftp.LIBSSH2_FXF_WRITE
FILE_FLAGS = (
ssh2_sftp.LIBSSH2_FXF_CREAT | ssh2_sftp.LIBSSH2_FXF_WRITE | ssh2_sftp.LIBSSH2_FXF_TRUNC
)
except ImportError:
logger.warning(
"ssh2-python is not installed, ssh actions will not work.\n"
Expand Down

0 comments on commit 0767e25

Please sign in to comment.