Message292697
> temp_name = tempfile.mktemp(dir=".")
> os.link("a", temp_name)
There is a race condition between generating file name and using it. tempfile.mktemp() is not much more useful that just a function that generates some names which unlikely matches the names of existing files the directory. In any case you should catch an error and repeat an attempt with different name. How much attempts to do and what additional checks to do is an application specific. |
|
Date |
User |
Action |
Args |
2017-05-01 19:00:55 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, georg.brandl, gumnos, r.david.murray, ethan.furman, bignose, eryksun |
2017-05-01 19:00:55 | serhiy.storchaka | set | messageid: <1493665255.41.0.899330762082.issue26362@psf.upfronthosting.co.za> |
2017-05-01 19:00:55 | serhiy.storchaka | link | issue26362 messages |
2017-05-01 19:00:55 | serhiy.storchaka | create | |
|