Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

delThumbs() deletes in more folders than it should #2

Closed
le717 opened this issue Apr 7, 2013 · 1 comment
Closed

delThumbs() deletes in more folders than it should #2

le717 opened this issue Apr 7, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@le717
Copy link
Owner

le717 commented Apr 7, 2013

Bug

For some reason, my code for deleting Thumbs.db before creating a Patch is deleting the file in more folders than it should. Possible bug is located in the os.walk() line, because I am still trying to figure out how to properly use os.walk().

Fix

  • Fix delThumbs() to delete Thumbs.db in the modded files ONLY
  • Remove delThumbs() and replace it with code to exclude certain files from the ZIP archive. Ideal fix, but unknown if it is possible with shutil.make_archive. Is possible with tarfile, but do not want to switch to a TAR.
  • Remove os.walk() and instead use the glob module. Use the code from ICU ReDirect as the base, or use it altogether.

How to reproduce:

  • Coming Never, as this was fixed before this section was written
@le717
Copy link
Owner Author

le717 commented Apr 13, 2013

This error has been fixed in commit 66e67a0
I corrected delThumbs() using code from the Python documentation on os.walk() (fix number 1 in the topic issue) and it now works perfectly.

@le717 le717 closed this as completed Apr 13, 2013
@ghost ghost assigned le717 May 2, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant