Skip to content

Commit fac334c

Browse files
Fixed root path to be empty for GetDirectoryName
1 parent 80af4f0 commit fac334c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Source/Applications/openPDC/WixFolderGen/GenWWWRootIncludes.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,13 @@ private static string GetComponentID(string fileName)
245245
private static string GetFileID(string fileName)
246246
{
247247
string suffix = FilePath.GetExtension(fileName);
248-
return Program.GetCleanID(FilePath.GetDirectoryName(fileName) + FilePath.GetFileNameWithoutExtension(fileName), "", suffix, MaxWixIDLength - suffix.Length, removeSpaces: true);
248+
return Program.GetCleanID(getDirectoryName() + FilePath.GetFileNameWithoutExtension(fileName), "", suffix, MaxWixIDLength - suffix.Length, removeSpaces: true);
249+
250+
string getDirectoryName()
251+
{
252+
string dirName = FilePath.GetDirectoryName(fileName);
253+
return dirName == ".\\" ? string.Empty : dirName;
254+
}
249255
}
250256
}
251257
}

0 commit comments

Comments
 (0)