@@ -103,9 +103,9 @@ public void CreatePackagingFolder(DebUOSConfiguration configuration)
103103 // 这里不能使用 AppendLine 方法,保持换行使用 \n 字符
104104 stringBuilder
105105 . Append ( "[Desktop Entry]\n " )
106- . Append ( $ "Categories={ configuration . DesktopCategories } \n ")
106+ . Append ( $ "Categories={ configuration . DesktopCategories . TrimEnd ( ',' ) } ; \n ")
107107 . Append ( $ "Name={ configuration . AppName } \n ")
108- . Append ( $ "Keywords={ configuration . DesktopKeywords } \n ")
108+ . Append ( $ "Keywords={ configuration . DesktopKeywords . TrimEnd ( ',' ) } ; \n ")
109109 . Append ( $ "Comment={ configuration . DesktopComment } \n ")
110110 . Append ( $ "Type={ configuration . DesktopType } \n ")
111111 . Append ( $ "Terminal={ configuration . DesktopTerminal . ToString ( ) . ToLowerInvariant ( ) } \n ")
@@ -118,7 +118,7 @@ public void CreatePackagingFolder(DebUOSConfiguration configuration)
118118
119119 if ( ! string . IsNullOrEmpty ( configuration . DesktopKeywordsZhCN ) )
120120 {
121- stringBuilder . Append ( $ "Keywords[zh_CN]={ configuration . DesktopKeywordsZhCN } \n ") ;
121+ stringBuilder . Append ( $ "Keywords[zh_CN]={ configuration . DesktopKeywordsZhCN . TrimEnd ( ';' ) } ; \n ") ;
122122 }
123123
124124 if ( ! string . IsNullOrEmpty ( configuration . DesktopCommentZhCN ) )
@@ -149,7 +149,7 @@ public void CreatePackagingFolder(DebUOSConfiguration configuration)
149149
150150 if ( ! string . IsNullOrEmpty ( configuration . DesktopMimeType ) )
151151 {
152- stringBuilder . Append ( $ "MimeType={ configuration . DesktopMimeType } \n ") ;
152+ stringBuilder . Append ( $ "MimeType={ configuration . DesktopMimeType . TrimEnd ( ';' ) } ; \n ") ;
153153 }
154154
155155 File . WriteAllText ( desktopFile , stringBuilder . ToString ( ) , encoding ) ;
0 commit comments