Skip to content

Commit

Permalink
fix(backend): page clone bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dewen committed May 18, 2023
1 parent a250f3e commit 3674cf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bodiless-backend/src/page.ts
Expand Up @@ -223,8 +223,8 @@ class Page {

async copyDirectory(origin: string, destination: string): Promise<object> {
const {basePath} = this;
const originPath = path.resolve(basePath, origin).replace(/\/$/, '');
const destinationPath = path.resolve(basePath, destination).replace(/\/$/, '');
const originPath = path.join(basePath, origin).replace(/\/$/, '');
const destinationPath = path.join(basePath, destination).replace(/\/$/, '');
const isDestinationPathExists = await Page.dirHasFiles(destinationPath);

if (isDestinationPathExists.length) {
Expand Down

0 comments on commit 3674cf9

Please sign in to comment.