summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmFileCommand.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index ee537f3..5b55b23 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -170,8 +170,16 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
{
std::string expr = m_Makefile->GetCurrentDirectory();
- expr += "/" + *i;
- g.FindFiles(expr);
+ // Handle script mode
+ if ( expr.size() > 0 )
+ {
+ expr += "/" + *i;
+ g.FindFiles(expr);
+ }
+ else
+ {
+ g.FindFiles(*i);
+ }
}
else
{