Skip to content

Commit

Permalink
NanikaContainerSyncDirectory::childrenSync bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Narazaka committed Jun 24, 2018
1 parent 61c8c3c commit 223bf43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/nanika-container-directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,9 @@ export class NanikaContainerSyncDirectory extends NanikaContainerSyncEntry imple

childrenSync() {
if (this._childrenCache) return this._childrenCache;
const re = new RegExp(`^${this.path}[/\\\\][^/\\\\]+$`);
this._childrenCache = this._childrenAllCache
.filter((child) => !/[\/\\]/.test(child.toString()))
.filter((child) => re.test(child.toString()))
.map((child) => child.isDirectorySync() ? this.new(child.basename().toString()) : child);
return this._childrenCache;
}
Expand Down

0 comments on commit 223bf43

Please sign in to comment.