Skip to content

Commit

Permalink
fix: get parent folder name portability (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon authored Apr 4, 2023
1 parent ddd2d5f commit 49b882e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/service/inFolderHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const {
META_REGEX,
METAFILE_SUFFIX,
} = require('../utils/metadataConstants')
const { GIT_PATH_SEP } = require('../utils/gitConstants')
const { cleanUpPackageMember } = require('../utils/packageHelper')
const { join, parse, sep } = require('path')
const { readDir } = require('../utils/fsHelper')
Expand Down Expand Up @@ -54,7 +53,7 @@ class InFolderHandler extends StandardHandler {

_isProcessable() {
const parsedLine = parse(this.line)
const parentFolder = parsedLine.dir.split(GIT_PATH_SEP).pop()
const parentFolder = parsedLine.dir.split(sep).pop()
return (
super._isProcessable() ||
parentFolder !== this.type ||
Expand Down
4 changes: 2 additions & 2 deletions src/service/inResourceHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const StandardHandler = require('./standardHandler')
const { join, parse } = require('path')
const { pathExists, readDir } = require('../utils/fsHelper')
const { META_REGEX } = require('../utils/metadataConstants')
const { GIT_PATH_SEP } = require('../utils/gitConstants')
const { sep } = require('path')
const { cleanUpPackageMember } = require('../utils/packageHelper')

const STATICRESOURCE_TYPE = 'staticresources'
Expand Down Expand Up @@ -78,7 +78,7 @@ class ResourceHandler extends StandardHandler {

_isProcessable() {
const parsedLine = parse(this.line)
const parentFolder = parsedLine.dir.split(GIT_PATH_SEP).pop()
const parentFolder = parsedLine.dir.split(sep).pop()

return (
super._isProcessable() ||
Expand Down

0 comments on commit 49b882e

Please sign in to comment.