From 6eca0af4408ffc5021e283310c3a2398191e96ac Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:28:43 +0300 Subject: [PATCH] fix: use path.join for all paths Replaces direct path concatenation with path.join() to ensure cross-platform compatibility. Fixes #35 --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ad58a2f..db5f168 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import * as path from 'path'; import { LinkAlreadyExists } from './errors/chain/link-already-exists'; import { NoLinkFound } from './errors/chain/no-link'; import { NoChainLoaded } from './errors/chainfile/no-chain-loaded'; @@ -13,7 +14,7 @@ class Chainson { private chain: Chainfile | undefined; constructor(chainLocation = 'chainfile', output = 'NORMAL') { - this.chainLocation = chainLocation + '.json'; + this.chainLocation = path.join(chainLocation + '.json'); this.output = output; this.init(); this.chainQueue = new ChainQueue(this.chainLocation);