From df61289965c58e879b917e1f626b8154e4585061 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 17 Oct 2019 10:44:17 +0200 Subject: [PATCH] session foldername --- src/FileCloud.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/FileCloud.js b/src/FileCloud.js index e6730e8e3..42fc246ad 100644 --- a/src/FileCloud.js +++ b/src/FileCloud.js @@ -113,7 +113,19 @@ function newFileCloud () { } if (pSession !== undefined) { - filePath = filePath.replace('@Session', pSession.id) + let code + let sessionFolderName = pSession.id + if (pSession.code !== undefined) { + try { + code = JSON.parse(pSession.code) + if (code.folderName !== undefined) { + sessionFolderName = code.folderName + } + } catch (err) { + sessionFolderName = pSession.id + } + } + filePath = filePath.replace('@Session', sessionFolderName) } if (pExchange !== undefined) {