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 Dec 31, 2023
1 parent b74534e commit e585fa1
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 @@ -127,7 +127,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 e585fa1

Please sign in to comment.