diff options
author | Maksim Sukharev <antreesy.web@gmail.com> | 2023-06-15 18:43:59 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-06-16 06:12:40 +0000 |
commit | 327e9adf58eec6c564ecd9cc313c5bab80d57886 (patch) | |
tree | 8dfedfc688dd5664e8564b9eca6e8e1590c809d1 /src | |
parent | 17e576c92986564f0ea5b666e5686e405a952468 (diff) |
skip only client.createDirectory if exists already
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/MediaSettings/VideoBackgroundEditor.vue | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/components/MediaSettings/VideoBackgroundEditor.vue b/src/components/MediaSettings/VideoBackgroundEditor.vue index 0b358ef4e..aa2177162 100644 --- a/src/components/MediaSettings/VideoBackgroundEditor.vue +++ b/src/components/MediaSettings/VideoBackgroundEditor.vue @@ -174,22 +174,22 @@ export default { const relativeBackgroundsFolderPath = this.$store.getters.getAttachmentFolder() + '/Backgrounds' const absoluteBackgroundsFolderPath = userRoot + relativeBackgroundsFolderPath - // Create the backgrounds folder if it doesn't exist - if (await client.exists(absoluteBackgroundsFolderPath) === false) { - try { + try { + // Create the backgrounds folder if it doesn't exist + if (await client.exists(absoluteBackgroundsFolderPath) === false) { await client.createDirectory(absoluteBackgroundsFolderPath) - - // Create picker - picker = getFilePickerBuilder(t('spreed', 'File to share')) - .setMultiSelect(false) - .setModal(true) - .startAt(relativeBackgroundsFolderPath) - .setType(1) - .allowDirectories(false) - .build() - } catch (error) { - console.debug(error) } + + // Create picker + picker = getFilePickerBuilder(t('spreed', 'File to share')) + .setMultiSelect(false) + .setModal(true) + .startAt(relativeBackgroundsFolderPath) + .setType(1) + .allowDirectories(false) + .build() + } catch (error) { + console.debug(error) } }, |