diff options
author | Eberhard Beilharz <ermshiperete@users.noreply.github.com> | 2020-08-31 12:38:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 12:38:39 +0300 |
commit | 728b1e92588ab897dcee142c541490ea200ba9b2 (patch) | |
tree | 49f8efec5ecc0fda2b77b43b700bbcf0839c6eac /mcs | |
parent | d71eff1541ede575d727ab1c6820175807ac1a1e (diff) |
[resgen] Honour absence of -usesourcepath (#20247)
* Only set basepath to the source directory if useSourcePath is set.
* Fixes a regression from mono 4 that happened when changing the code
to not use reflection.
Co-authored-by: MarkS <marksvc@gmail.com>
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/tools/resgen/monoresgen.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mcs/tools/resgen/monoresgen.cs b/mcs/tools/resgen/monoresgen.cs index c5f5ac1e900..6681bd4e558 100644 --- a/mcs/tools/resgen/monoresgen.cs +++ b/mcs/tools/resgen/monoresgen.cs @@ -72,7 +72,9 @@ Options: return new ResourceReader (stream); case ".resx": var reader = new ResXResourceReader (stream); - reader.BasePath = Path.GetDirectoryName (name); + if (useSourcePath) { + reader.BasePath = Path.GetDirectoryName (name); + } return reader; default: throw new Exception ("Unknown format in file " + name); |