@@ -1114,37 +1114,30 @@ public void ResultCopy(string stringToCopy)
1114
1114
{
1115
1115
if ( string . IsNullOrEmpty ( stringToCopy ) )
1116
1116
{
1117
- var result = Results . SelectedItem ? . Result ;
1118
- if ( result != null )
1119
- {
1120
- string copyText = result . CopyText ;
1121
- var isFile = File . Exists ( copyText ) ;
1122
- var isFolder = Directory . Exists ( copyText ) ;
1123
- if ( isFile || isFolder )
1124
- {
1125
- var paths = new StringCollection
1126
- {
1127
- copyText
1128
- } ;
1129
-
1130
- Clipboard . SetFileDropList ( paths ) ;
1131
- App . API . ShowMsg (
1132
- $ "{ App . API . GetTranslation ( "copy" ) } { ( isFile ? App . API . GetTranslation ( "fileTitle" ) : App . API . GetTranslation ( "folderTitle" ) ) } ",
1133
- App . API . GetTranslation ( "completedSuccessfully" ) ) ;
1134
- }
1135
- else
1136
- {
1137
- Clipboard . SetDataObject ( copyText ) ;
1138
- App . API . ShowMsg (
1139
- $ "{ App . API . GetTranslation ( "copy" ) } { App . API . GetTranslation ( "textTitle" ) } ",
1140
- App . API . GetTranslation ( "completedSuccessfully" ) ) ;
1141
- }
1142
- }
1143
-
1144
1117
return ;
1145
1118
}
1119
+ var isFile = File . Exists ( stringToCopy ) ;
1120
+ var isFolder = Directory . Exists ( stringToCopy ) ;
1121
+ if ( isFile || isFolder )
1122
+ {
1123
+ var paths = new StringCollection
1124
+ {
1125
+ stringToCopy
1126
+ } ;
1146
1127
1147
- Clipboard . SetDataObject ( stringToCopy ) ;
1128
+ Clipboard . SetFileDropList ( paths ) ;
1129
+ App . API . ShowMsg (
1130
+ $ "{ App . API . GetTranslation ( "copy" ) } { ( isFile ? App . API . GetTranslation ( "fileTitle" ) : App . API . GetTranslation ( "folderTitle" ) ) } ",
1131
+ App . API . GetTranslation ( "completedSuccessfully" ) ) ;
1132
+ }
1133
+ else
1134
+ {
1135
+ Clipboard . SetDataObject ( stringToCopy ) ;
1136
+ App . API . ShowMsg (
1137
+ $ "{ App . API . GetTranslation ( "copy" ) } { App . API . GetTranslation ( "textTitle" ) } ",
1138
+ App . API . GetTranslation ( "completedSuccessfully" ) ) ;
1139
+ }
1140
+ return ;
1148
1141
}
1149
1142
1150
1143
#endregion
0 commit comments