Commit 1ea0262
authored
[fix] fix build failure from package vulnerability (#149)
Package 'Tmds.DBus.Protocol' explicitly added as build fails from
transient package usage. `Warning As Error: Package 'Tmds.DBus.Protocol'
0.21.2 has a known high severity vulnerability,
[https://github.com/advisories/GHSA-xrw6-gwf8-vvr9](https://github.com/advisories/GHSA-xrw6-gwf8-vvr9)
File
[JavaToCSharpGui\ViewModels\MainWindowViewModel.cs](https://github.com/paulirwin/JavaToCSharp/blob/master/JavaToCSharpGui/ViewModels/MainWindowViewModel.cs)
Line187 has been changed from
`int subStartIndex = dir.FullName.Length;` to
`int subStartIndex = dir.FullName.Length - 1;`
- Fixes exception `'startIndex cannot be larger than length of string.
(Parameter 'startIndex')'` thrown on line193, `string jOutPath =
$"{outDirFullName}{jPath[subStartIndex..]}";` when sub directories are
not present or .java files are directly under chosen directory
- Fixes improper directory duplicate creation when sub dirs are present.
Previous result takes `maindir/subdir_one/file_one.java` and creates
`maindir/maindir_csharp_outputsubdir_one/file_one.java` &
`maindir/maindir_csharp_output/subdir_one/file_one.java`
current result takes
`maindir/subdir_one/file_one.java` and cretes only
`maindir/maindir_csharp_output/subdir_one/file_one.java`1 parent d3ab6db commit 1ea0262
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
193 | | - | |
| 192 | + | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
0 commit comments