File tree 1 file changed +8
-6
lines changed
cosmic-settings/src/pages/system
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -256,18 +256,20 @@ impl Page {
256
256
match system_actions {
257
257
Err ( e) => {
258
258
// we don't have system_actions set?
259
- println ! ( "{}" , e ) ;
259
+ tracing :: error! ( ?e , "Unable to get system_actions shortcuts config" ) ;
260
260
}
261
261
Ok ( mut actions) => {
262
262
let default_paths = default_paths ( ) ;
263
263
let mut resolved_path = None ;
264
264
265
265
// loop through all FDE paths to try and find a valid .desktop file
266
266
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
+ }
271
273
}
272
274
}
273
275
@@ -279,7 +281,7 @@ impl Page {
279
281
actions. insert ( System :: Terminal , String :: from ( exec) ) ;
280
282
281
283
if let Err ( e) = shortcuts. set ( "system_actions" , actions) {
282
- println ! ( "{}" , e ) ;
284
+ tracing :: error! ( ?e , "Unable to set system_actions shortcuts config" ) ;
283
285
}
284
286
}
285
287
You can’t perform that action at this time.
0 commit comments