Skip to content

Commit 7c64366

Browse files
committed
Merge pull request #76 from vstm/win-dirname-compat
NodeTouchCommand failing on windows
2 parents 04f0b23 + a349f03 commit 7c64366

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/PHPCR/Util/Console/Command/NodeTouchCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
use Symfony\Component\Console\Input\InputInterface;
3030
use Symfony\Component\Console\Output\OutputInterface;
3131
use PHPCR\PathNotFoundException;
32+
use PHPCR\Util\PathHelper;
3233

3334
/**
3435
* Command to create a PHPCR node of a specified type from
@@ -122,8 +123,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
122123
}
123124
} else {
124125

125-
$nodeName = basename($path);
126-
$parentPath = dirname($path);
126+
$nodeName = PathHelper::getNodeName($path);
127+
$parentPath = PathHelper::getParentPath($path);
127128

128129
try {
129130
$parentNode = $session->getNode($parentPath);

0 commit comments

Comments
 (0)