Properly escape preview file paths on Windows

This commit is contained in:
Ben Gotow 2019-01-03 11:59:56 -08:00
parent 255f3be62a
commit 6b2546c71f

View file

@ -183,7 +183,9 @@ export class AttachmentItem extends Component {
<div
draggable={false}
className="file-thumbnail-preview"
style={{ background: `url('file://${filePreviewPath}') 0% 1% / cover` }}
style={{
background: `url('file://${filePreviewPath.replace(/\\/g, '\\\\')}') 0% 1% / cover`,
}}
/>
) : null}
<div className="inner">