Skip to content

Commit

Permalink
fix(studio): Fix windows path issues (#9752)
Browse files Browse the repository at this point in the history
**Problem**
#9545 Highlights some compatibility issues with studio on windows.

**Changes**
1. Removes some assumptions of `/` as the path separator.

**Fixes**
Fixes #9545 in combination with #9639
  • Loading branch information
Josh-Walker-GM authored and Tobbe committed Jan 1, 2024
1 parent e07e967 commit 661b63d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/studio/api/mail/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export async function updateMailTemplates() {
(file) => {
const correspondingDistEntry =
file
.replace('api/src', 'api/dist')
.replace(path.join('api', 'src'), path.join('api', 'dist'))
.substring(0, file.lastIndexOf('.') + 1) + '.js'
return distFiles.includes(correspondingDistEntry)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/studio/api/services/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export async function getRenderedMail(
// Import the template component
const templateComponentDistPath =
template.path
.replace('api/src', 'api/dist')
.replace(path.join('api', 'src'), path.join('api', 'dist'))
.substring(0, template.path.lastIndexOf('.') + 1) + '.js'

const templateImportPath = templateComponentDistPath.replace(
Expand Down

0 comments on commit 661b63d

Please sign in to comment.