Videocache is no longer in development.

os.rename issue on some Unix platforms

by Anonymous on 27 May 2011

I consider this issue not as bug, but i suggest change 1 line of code in vc-scheduler:


os.rename(tmp_path, video_path) 


shutil.move(tmp_path, video_path)

Otherwise if i have tmp dir and cache dirs on difirent partitions, under linux (im my case was Gentoo kernel 2.6.39 arch x86_64 Python 2.6/3.1) os.rename can trigger error and as result files unable to move from tmp dir to real cache dir.
This bug of os.rename noticed in Python documentation (The operation may fail on some Unix flavors if src and dst are on different filesystems.).

Thank you for realy good solution.

0 Answers