From 8c3cb9d9e3322b22fdd0f519299a02ca771cc5e3 Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Wed, 13 Dec 2017 12:21:07 +0100 Subject: Fix command line parser not working when adding moc file Change-Id: I51acae97067da9ab1876fa53630393b89a4b551b Reviewed-by: Oliver Wolff --- src/qtprojectlib/QtMsBuild.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qtprojectlib/QtMsBuild.cs') diff --git a/src/qtprojectlib/QtMsBuild.cs b/src/qtprojectlib/QtMsBuild.cs index f85b4562..19adb280 100644 --- a/src/qtprojectlib/QtMsBuild.cs +++ b/src/qtprojectlib/QtMsBuild.cs @@ -496,7 +496,8 @@ namespace QtProjectLib.QtMsBuild .FirstOrDefault(); if (!string.IsNullOrEmpty(execPath)) { var execDir = Path.GetDirectoryName(execPath); - qtDir = HelperFunctions.CanonicalPath(Path.Combine(execDir, "..")); + if (!string.IsNullOrEmpty(execDir)) + qtDir = HelperFunctions.CanonicalPath(Path.Combine(execDir, "..")); } string filePath = parser.PositionalArguments.Where( -- cgit v1.2.3