Skip to content

Commit

Permalink
Merge pull request #1 from Zemoj/patch-1
Browse files Browse the repository at this point in the history
Dont overwrite Existing Files
  • Loading branch information
David Dahl authored Jan 19, 2019
2 parents 1bef575 + 3a5fd81 commit 340e4c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simpleextractor/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ def _on_torrent_finished(self, torrent_id):
except Exception, e:
log.error("EXTRACTOR: Error creating destination folder: %s", e)
return


# Dont Overwrite Existing Files
if os.stat(dest).st_size > 0
log.error("EXTRACTOR: Extract failed: %s already exists (%s)", fpath, torrent_id)
continue

def on_extract_success(result, torrent_id, fpath):
# XXX: Emit an event
log.info("EXTRACTOR: Extract successful: %s (%s)", fpath, torrent_id)
Expand Down

0 comments on commit 340e4c7

Please sign in to comment.