wizzy icon indicating copy to clipboard operation
wizzy copied to clipboard

Forward slash in folder name breaks export

Open sciurus opened this issue 4 years ago • 1 comments

In Grafana, I created a folder name Test / Folder. Inside that folder I created a dashboard named A Test Dashboard.

The dashboard fails to export with the error

✘ Dashboard a-test-dashboard import failed: Error: ENOENT: no such file or directory, mkdir 'dashboards/Test / Folder'

I tried creating a dashboard with name Test / Dashboard in the General folder and it was successfully exported as test-dashboard.

It looks like https://github.com/grafana-wizzy/wizzy/blob/840b23b38e3933f3cad55898bdb1338ba55a14e1/src/util/localfs.js#L86 is used to sanitize the names of files but not of directories.

sciurus avatar Jan 14 '20 17:01 sciurus

Good catch, I will sanitize the folder name thanks for reporting. I plan to start working on wizzy next week. Please comment back if its not fixed soon.

Sytten avatar Jan 15 '20 17:01 Sytten