diff options
author | Rob Mensching <rob@firegiant.com> | 2019-05-21 23:59:59 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2019-05-23 16:02:37 -0700 |
commit | 1ed894bc0f39397ec7f7f6344370fc2123420c43 (patch) | |
tree | b125105a57c5a444f5a86b0d8448454c1cfd669c | |
parent | 44fb31d655bc5860d45e3acd4cd0cbfaaf5f12eb (diff) | |
download | wix-1ed894bc0f39397ec7f7f6344370fc2123420c43.tar.gz wix-1ed894bc0f39397ec7f7f6344370fc2123420c43.tar.bz2 wix-1ed894bc0f39397ec7f7f6344370fc2123420c43.zip |
Use full path in source line numbers
-rw-r--r-- | src/WixToolset.Core/Preprocessor.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/WixToolset.Core/Preprocessor.cs b/src/WixToolset.Core/Preprocessor.cs index 5a255234..d086cbd9 100644 --- a/src/WixToolset.Core/Preprocessor.cs +++ b/src/WixToolset.Core/Preprocessor.cs | |||
@@ -1348,9 +1348,11 @@ namespace WixToolset.Core | |||
1348 | throw new WixException(ErrorMessages.TooDeeplyIncluded(state.Context.CurrentSourceLineNumber, state.CurrentFileStack.Count)); | 1348 | throw new WixException(ErrorMessages.TooDeeplyIncluded(state.Context.CurrentSourceLineNumber, state.CurrentFileStack.Count)); |
1349 | } | 1349 | } |
1350 | 1350 | ||
1351 | state.CurrentFileStack.Push(fileName); | 1351 | var path = Path.GetFullPath(fileName); |
1352 | |||
1353 | state.CurrentFileStack.Push(path); | ||
1352 | state.SourceStack.Push(state.Context.CurrentSourceLineNumber); | 1354 | state.SourceStack.Push(state.Context.CurrentSourceLineNumber); |
1353 | state.Context.CurrentSourceLineNumber = new SourceLineNumber(fileName); | 1355 | state.Context.CurrentSourceLineNumber = new SourceLineNumber(path); |
1354 | state.IncludeNextStack.Push(true); | 1356 | state.IncludeNextStack.Push(true); |
1355 | } | 1357 | } |
1356 | 1358 | ||
@@ -1468,8 +1470,10 @@ namespace WixToolset.Core | |||
1468 | { | 1470 | { |
1469 | public ProcessingState(IServiceProvider serviceProvider, IPreprocessContext context) | 1471 | public ProcessingState(IServiceProvider serviceProvider, IPreprocessContext context) |
1470 | { | 1472 | { |
1473 | var path = Path.GetFullPath(context.SourcePath); | ||
1474 | |||
1471 | this.Context = context; | 1475 | this.Context = context; |
1472 | this.Context.CurrentSourceLineNumber = new SourceLineNumber(context.SourcePath); | 1476 | this.Context.CurrentSourceLineNumber = new SourceLineNumber(path); |
1473 | this.Context.Variables = this.Context.Variables == null ? new Dictionary<string, string>() : new Dictionary<string, string>(this.Context.Variables); | 1477 | this.Context.Variables = this.Context.Variables == null ? new Dictionary<string, string>() : new Dictionary<string, string>(this.Context.Variables); |
1474 | 1478 | ||
1475 | this.Helper = serviceProvider.GetService<IPreprocessHelper>(); | 1479 | this.Helper = serviceProvider.GetService<IPreprocessHelper>(); |