From 3f13791404bf0d9330cebe94769acdb85122cb49 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 6 Nov 2013 01:22:30 +0100 Subject: [PATCH] Only delete files/folders if they exist on filesystem This broke "add a folder" in manage-files.feature --- src/SilverStripe/BehatExtension/Context/BasicContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SilverStripe/BehatExtension/Context/BasicContext.php b/src/SilverStripe/BehatExtension/Context/BasicContext.php index 7115cbd..1c04976 100644 --- a/src/SilverStripe/BehatExtension/Context/BasicContext.php +++ b/src/SilverStripe/BehatExtension/Context/BasicContext.php @@ -205,7 +205,7 @@ JS; public function cleanAssetsAfterScenario(ScenarioEvent $event) { foreach(\File::get() as $file) { - $file->delete(); + if(file_exists($file->getFullPath())) $file->delete(); } }