File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -202,11 +202,20 @@ final class AppListModel: ObservableObject {
202202
203203extension AppListModel {
204204 func openInFilza( _ url: URL ) {
205- guard let filzaURL else {
205+ // 获取原始文件路径字符串
206+ let rawPath = url. path
207+ // 对路径进行百分号编码
208+ guard let encodedPath = rawPath. addingPercentEncoding ( withAllowedCharacters: . urlPathAllowed) else {
209+ // 如果编码失败,尝试打开
210+ UIApplication . shared. open ( url)
206211 return
207212 }
208- let fileURL = filzaURL. appendingPathComponent ( url. path)
209- UIApplication . shared. open ( fileURL)
213+
214+ let finalURLString = " filza://view " + encodedPath
215+
216+ guard let finalURL = URL ( string: finalURLString) else { return }
217+
218+ UIApplication . shared. open ( finalURL)
210219 }
211220
212221 func rebuildIconCache( ) {
You can’t perform that action at this time.
0 commit comments