Menu

#73 sr_sftp.py overwriting bug

SarraBeta
closed
psilva
None
1
2017-07-29
2016-12-22
Eric Funk
No

sr_sftp.py has a bug when overwriting existing files. If the new file is smaller then the replaced file you will get the 'extra' portions of the old file left at the end of the updated file. i.e. if I uploaded a file called 'test.txt' via sr_watch or sr_poll with the following contents:

line1
line2
line3
line4

Then changed the file later with the contents

line10
line11

The resulting file would be

line10
line11
line3
line4

Discussion

  • psilva

    psilva - 2016-12-23

    commit 3dcf93c751cc21574795ba5515c3337d297587df in master.
    Added truncation logic to sftp download.

     
  • psilva

    psilva - 2017-01-07

    Reviewed a lot of other code, added trunctation logic in other places as well.

     
  • psilva

    psilva - 2017-02-03

    fix released in 2.17.02a1

     
  • psilva

    psilva - 2017-02-03
    • status: open --> closed
     

Log in to post a comment.

Auth0 Logo