From 73f61f06872aa12d796f9f5359ae1f53907e5638 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 24 Sep 2016 06:59:39 +0200 Subject: [PATCH] util: keep the probing file, it prevents spurious writes --- src/etc/inc/util.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 059ab1062..02d9c438f 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -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; }