File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
cosmic-settings/src/pages/system Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -256,18 +256,20 @@ impl Page {
256256 match system_actions {
257257 Err ( e) => {
258258 // we don't have system_actions set?
259- println ! ( "{}" , e ) ;
259+ tracing :: error! ( ?e , "Unable to get system_actions shortcuts config" ) ;
260260 }
261261 Ok ( mut actions) => {
262262 let default_paths = default_paths ( ) ;
263263 let mut resolved_path = None ;
264264
265265 // loop through all FDE paths to try and find a valid .desktop file
266266 for path in default_paths {
267- let full_path = path. join ( [ appid, ".desktop" ] . concat ( ) ) ;
268- if full_path. exists ( ) && full_path. is_file ( ) {
269- resolved_path = Some ( full_path) ;
270- break ;
267+ if let Ok ( mut full_path) = path. canonicalize ( ) {
268+ full_path = full_path. join ( [ appid, ".desktop" ] . concat ( ) ) ;
269+ if full_path. exists ( ) && full_path. is_file ( ) {
270+ resolved_path = Some ( full_path) ;
271+ break ;
272+ }
271273 }
272274 }
273275
@@ -279,7 +281,7 @@ impl Page {
279281 actions. insert ( System :: Terminal , String :: from ( exec) ) ;
280282
281283 if let Err ( e) = shortcuts. set ( "system_actions" , actions) {
282- println ! ( "{}" , e ) ;
284+ tracing :: error! ( ?e , "Unable to set system_actions shortcuts config" ) ;
283285 }
284286 }
285287
You can’t perform that action at this time.
0 commit comments