rlee287 / pyautoupdate

An auto-update API for Python programs. ARCHIVED: The update mechanism here contains no guarantees about code integrity. You may want to look at TUF (The Update Framework) instead.
GNU Lesser General Public License v2.1
14 stars 2 forks source link

More robust file replacing (Thanks to dd) #12

Closed rlee287 closed 8 years ago

rlee287 commented 8 years ago

More robust file replacing:

  1. Move old files and filelist to temp directory
  2. Move new files into correct directory
  3. Create new filelist
  4. Clean up temp directory and old filelist

This should use tempfile.mkdtemp or tempfile.mkstemp because the files should be left behind in case something goes wrong.

Instead of sending the whole process instance over in run(background=True), possibly use @property to send the stuff over?