Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4403 closed defect (fixed)

Thandy should fail when trying to create an existing dir inside a package

Reported by: chiiph Owned by: nickm
Priority: Medium Milestone:
Component: Archived/Thandy Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: #4460 Points:
Reviewer: Sponsor:

Description

I bumped into this issue with a problematic package I mistakenly created, installation failed but some directories were created in the install root. When I tried to reinstall it, it broke when trying to create that same directory it left behind the last time.

A possible fix for this is in my branch createdir.

Child Tickets

Change History (5)

comment:1 Changed 8 years ago by chiiph

Status: newneeds_review

comment:2 Changed 8 years ago by nickm

A bare "except" is usually a bad idea. If we want to ignore EEXIST, we should probably be catching only OSError, and re-raising if the "errno" field" isn't EEXIST. (For instance, we probably *do* want to fail if the operation dies with EPERM, or because some bug made it so filename? was None, or something like that.)

Also this code is still doing the join-with-/ thing, which means it will probably conflict with whatever fix we do for that.

comment:3 Changed 8 years ago by chiiph

Darn, you're right, I totally missed that.

I've updated the branch. Tested and working for both cases (EEXIST and EPERM (and any other possible errno that should re-raise)).

comment:4 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Thanks; merged!

comment:5 Changed 8 years ago by chiiph

Parent ID: #4460
Note: See TracTickets for help on using tickets.