This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author diegoqueiroz
Recipients diegoqueiroz, eric.araujo, tarek
Date 2011-01-19.17:07:10
SpamBayes Score 4.018731e-08
Marked as misclassified No
Message-id <1295456838.39.0.734609669589.issue10948@psf.upfronthosting.co.za>
In-reply-to
Content
There is a problem with dir_util cache (defined by "_path_created" global variable).

It appears to be useful but it isn't, just repeat these steps to understand the problem I'm facing:

1) Use mkpath to create any path (eg. /home/user/a/b/c)
2) Open the terminal and manually delete the directory "/home/user/a" and its contents
3) Try to create "/home/user/a/b/c" again using mkpath

Expected behavior:
mkpath should create the folder tree again.

What happens:
Nothing, mkpath "thinks" the folder already exists because its creation was cached. Moreover, if you try to create one more folder level (eg. /home/user/a/b/c/d) it raises an exception because it thinks that part of the tree was already created and fails to create the last folder.


I'm working with parallel applications that deal with files asynchronously, this problem gave me a headache.

Anyway, the solution is easy: remove the cache.
History
Date User Action Args
2011-01-19 17:07:18diegoqueirozsetrecipients: + diegoqueiroz, tarek, eric.araujo
2011-01-19 17:07:18diegoqueirozsetmessageid: <1295456838.39.0.734609669589.issue10948@psf.upfronthosting.co.za>
2011-01-19 17:07:10diegoqueirozlinkissue10948 messages
2011-01-19 17:07:10diegoqueirozcreate