File tree Expand file tree Collapse file tree 2 files changed +21
-10
lines changed
Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,26 @@ public static List<string> GetAdditionalRenderAppearancePaths()
3939
4040 foreach ( var p in paths )
4141 {
42- string trimmedPath = p . Trim ( ) ;
42+ string cleanedPath = p . Trim ( ) . Trim ( '"' ) ;
4343
44- // If already rooted, normalize it
45- if ( Path . IsPathRooted ( trimmedPath ) )
46- {
47- absolutePaths . Add ( Path . GetFullPath ( trimmedPath ) ) ;
48- }
49- else
44+ // Replace | with ; or split further if needed
45+ cleanedPath = cleanedPath . Replace ( '|' , ';' ) ;
46+
47+ foreach ( var subPath in cleanedPath . Split ( new [ ] { ';' } , StringSplitOptions . RemoveEmptyEntries ) )
5048 {
51- // Combine with user profile to resolve relative path
52- string fullPath = Path . GetFullPath ( Path . Combine ( userProfile , trimmedPath ) ) ;
49+ string trimmedPath = subPath . Trim ( ) . Trim ( '"' ) ;
50+
51+ if ( Path . GetInvalidPathChars ( ) . Any ( c => trimmedPath . Contains ( c ) ) )
52+ {
53+ // Skip or log invalid path
54+ Console . WriteLine ( $ "Skipping invalid path: { trimmedPath } ") ;
55+ continue ;
56+ }
57+
58+ string fullPath = Path . IsPathRooted ( trimmedPath )
59+ ? Path . GetFullPath ( trimmedPath )
60+ : Path . GetFullPath ( Path . Combine ( userProfile , trimmedPath ) ) ;
61+
5362 absolutePaths . Add ( fullPath ) ;
5463 }
5564 }
Original file line number Diff line number Diff line change 6363 </TextBlock >
6464
6565 <StackPanel Orientation =" Horizontal"
66- VerticalAlignment =" Bottom" >
66+ VerticalAlignment =" Bottom"
67+ HorizontalAlignment =" Center"
68+ Margin =" 0,0,0,15" >
6769 <Button Content =" Report Error"
6870 Style =" {DynamicResource MainButtonStyle}"
6971 Background =" Transparent"
You can’t perform that action at this time.
0 commit comments