File deletion delay
Wim Roffel
0
Reputation points
For a software project in which I participate the installation routine contains the following code (PHP):
unlink(getcwd() . '/index.php');
unlink(getcwd() . '/prestashop.zip');
rename(getcwd() . '/index.php.temp', getcwd() . '/index.php');
It results in an "access denied" error for the last line.
This is a Windows specific error. Somehow the file of the first line (that is also the executing code that contains this line) is not yet deleted when the third line is executed and as a result the third line is refused.
I would like to know how I can work around this problem.
Windows for business | Windows Client for IT Pros | User experience | Other
Sign in to answer