From 2e2fc799e26695c4d487af60a185c6cb4e20017e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 23 Jul 2022 17:53:50 +1000 Subject: [PATCH] Only show basename of CSV file --- ts/import-csv/StickyFooter.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/import-csv/StickyFooter.svelte b/ts/import-csv/StickyFooter.svelte index 3efc535ee..3ca552ace 100644 --- a/ts/import-csv/StickyFooter.svelte +++ b/ts/import-csv/StickyFooter.svelte @@ -15,12 +15,16 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export let onImport: () => void; const keyCombination = "Control+Enter"; + + function basename(path: String): String { + return path.split(/[\\/]/).pop()!; + }