File tree Expand file tree Collapse file tree
UniGetUI.PackageEngine.PackageManagerClasses/Packages/Classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 <TargetPlatformMinVersion >10.0.19041.0</TargetPlatformMinVersion >
66 <!-- IF BUILD FAILS DUE TO MISSING Microsoft.Management.Deployment NAMESPACE,
77 TOGGLE THE LAST NUMBER OF THE LINE BELOW 1 UNIT UP OR DOWN, AND REBUILD-->
8- <WindowsSdkPackageVersion >10.0.26100.57 </WindowsSdkPackageVersion >
8+ <WindowsSdkPackageVersion >10.0.26100.56 </WindowsSdkPackageVersion >
99
1010 <SdkVersion >8.0.407</SdkVersion >
1111 <Authors >Martí Climent and the contributors</Authors >
Original file line number Diff line number Diff line change @@ -103,12 +103,21 @@ public static Status GetStatus(string shortcutPath)
103103 /// <returns>A list of desktop shortcut paths</returns>
104104 public static List < string > GetShortcutsOnDisk ( )
105105 {
106- List < string > shortcuts = [ ] ;
107- string UserDesktop = Environment . GetFolderPath ( Environment . SpecialFolder . DesktopDirectory ) ;
108- string CommonDesktop = Environment . GetFolderPath ( Environment . SpecialFolder . CommonDesktopDirectory ) ;
109- shortcuts . AddRange ( Directory . EnumerateFiles ( UserDesktop , "*.lnk" ) ) ;
110- shortcuts . AddRange ( Directory . EnumerateFiles ( CommonDesktop , "*.lnk" ) ) ;
111- return shortcuts ;
106+ try
107+ {
108+ List < string > shortcuts = [ ] ;
109+ string UserDesktop = Environment . GetFolderPath ( Environment . SpecialFolder . DesktopDirectory ) ;
110+ string CommonDesktop = Environment . GetFolderPath ( Environment . SpecialFolder . CommonDesktopDirectory ) ;
111+ if ( UserDesktop != "" ) shortcuts . AddRange ( Directory . EnumerateFiles ( UserDesktop , "*.lnk" ) ) ;
112+ if ( CommonDesktop != "" ) shortcuts . AddRange ( Directory . EnumerateFiles ( CommonDesktop , "*.lnk" ) ) ;
113+ return shortcuts ;
114+ }
115+ catch ( Exception ex )
116+ {
117+ Logger . Error ( "Failed to load desktop shortcuts on disk" ) ;
118+ Logger . Error ( ex ) ;
119+ return [ ] ;
120+ }
112121 }
113122
114123 /// <summary>
You can’t perform that action at this time.
0 commit comments