File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -495,8 +495,15 @@ void setFilepaths() {
495
495
: fs::temp_directory_path ())
496
496
/ constants.temporary_directory_name ;
497
497
498
- global_path.persistent =
499
- (getenv (" CLIPBOARD_PERSISTDIR" ) ? getenv (" CLIPBOARD_PERSISTDIR" ) : (getenv (" XDG_STATE_HOME" ) ? getenv (" XDG_STATE_HOME" ) : global_path.home )) / constants.persistent_directory_name ;
498
+ if (getenv (" CLIPBOARD_PERSISTDIR" )) {
499
+ global_path.persistent = getenv (" CLIPBOARD_PERSISTDIR" );
500
+ } else {
501
+ if (getenv (" XDG_STATE_HOME" )) {
502
+ global_path.persistent = getenv (" XDG_STATE_HOME" ) / fs::path (" clipboard" );
503
+ } else {
504
+ global_path.persistent = global_path.home / constants.persistent_directory_name ;
505
+ }
506
+ }
500
507
501
508
path = Clipboard (clipboard_name, clipboard_entry);
502
509
}
You canโt perform that action at this time.
0 commit comments