contao/import — Issue #2908: Throw exception when runonce.php cannot be deleted
Author: aschempp
Created: 2011-11-29 20:29:35+00:00
State: open
Labels: Feature, framework

On wrong-configured system, the runonce.php can eventually not be deleted by the system. This will result in the file being executed on every page load.
In my opinion, we should throw an exception and tell the user to delete the file or fix the permission issue.

initialize.php, last few lines

```
$objFiles = Files::getInstance();
if (!$objFiles->delete('system/runonce.php'))
{
throw new Exception('Please delete system/runonce.php or fix permission problems on your system.');
}
```

--- _Originally created on March 4th, 2011, at 01:29pm (ID 2908)_