New submission from Diego Queiroz <queiroz.di...@gmail.com>:

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.

----------
assignee: tarek
components: Distutils
messages: 126540
nosy: diegoqueiroz, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Trouble with dir_util created dir cache
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10948>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to