1
0
Fork 0

ensure path to the ics file is absolute

This commit is contained in:
Ryan Mwangi 2024-10-25 14:44:43 +03:00
parent d1084ea558
commit 9420ce1cce
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ END:VEVENT
// Serve the merged calendar file and refresh if older than an hour
app.get('/calendar/:name', async (req, res) => {
const calendarName = req.params.name;
const icsFilePath = path.join(MERGED_CALENDARS_DIR, `${calendarName}.ics`);
const icsFilePath = path.resolve(MERGED_CALENDARS_DIR, `${calendarName}.ics`);
const jsonFilePath = path.join(MERGED_CALENDARS_DIR, `${calendarName}.json`);
try {