From 01b720e92b09d053c43fa7deae7bfa92e73b3e64 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 16 Feb 2011 20:56:38 +0000 Subject: [PATCH] -Add warning if about to mkpath but path exists as a non-directory git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8863 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 2419e9bbe..da4633dee 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -3948,6 +3948,10 @@ sub cpNetbootImages { } if (! -d $destDir) { + if ( -e $destDir ) { + xCAT::SvrUtils::sendmsg([1,"Could not copy netboot contents to $destDir, it exists but is not currently a directory"], $output_handler); + return; + } mkpath($destDir); }