mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
util: keep the probing file, it prevents spurious writes
This commit is contained in:
parent
98ed70d8ea
commit
73f61f0687
@ -1566,12 +1566,15 @@ function is_install_media()
|
||||
* Despite unionfs underneath, / is still not writeable,
|
||||
* making the following the perfect test for install media.
|
||||
*/
|
||||
|
||||
$file = '/.probe.for.install.media';
|
||||
|
||||
if (file_exists($file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$fd = @fopen($file, 'w');
|
||||
if ($fd) {
|
||||
fclose($fd);
|
||||
unlink($file);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user