Ticket #1 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Check directories before os.rename's

Reported by: ben@… Owned by: pjenvey
Priority: normal Milestone:
Component: NZBLeecher Version: 0.3
Severity: normal Keywords: 0.3-HEAD
Cc:

Description

Ziplick crashes if a directory exists that its trying to move to. Add checks before the os.rename's to ensure the destination directory doesn't exist, if it does, change its name first.

Change History

Changed 8 years ago by pjenvey

  • status changed from new to assigned
  • owner changed from bbangert to pjenvey

Changed 8 years ago by pjenvey

  • status changed from assigned to closed
  • keywords 0.3-HEAD added
  • resolution set to fixed

changeset 78 has a fix for this. If the destination path already exists, it will rename the file/directory to <archiveName>_hellanzb_renamed<i>

i'm also using shutil.move as opposed to os.rename, it handles moving files/directories across different mount points in unix without throwing exceptions (like os.rename does)

Note: See TracTickets for help on using tickets.