@samitouri / QOSami-HFS / commits / fb9aaa05

fix: error setting comment from breadcrumb on a folder with non-ascii chars #1043

Massimo Melina committed Jul 29, 2025 at 10:34 UTC fb9aaa0559dad61b867348d3cd6bf568fb562de7
1 file changed +2 -1
frontend/src/fileMenu.ts
+2 -1
@@ -196,7 +196,8 @@ async function editComment(entry: DirEntry) {
196 const res = await inputComment(entry.name, entry.comment)
197 if (res === undefined) return
198 await apiCall('comment', { uri: entry.uri, comment: res }, { modal: working })
199 - if (entry.uri === location.pathname) // current folder = breadcrumb
199 + // location is fully encoded, while entry.uri uses pathEncode
200 + if (decodeURI(entry.uri) === decodeURI(location.pathname)) // is current folder = is from breadcrumb
201 _.set(state, 'props.comment', res)
202 else
203 updateEntry(entry, e => e.comment = res)