Skip to content

Commit 185b666

Browse files
authored
Merge pull request dokuwiki#4462 from dregad/i4461-dwpage-dir-warning
dwpage: Detect that workingfile is a directory
2 parents 0a419b8 + 443c53d commit 185b666

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/dwpage.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ protected function commandCheckout($wiki_id, $localfile)
217217
$localfile = getcwd() . '/' . PhpString::basename($wiki_fn);
218218
}
219219

220+
if (is_dir($localfile)) {
221+
$this->fatal("Working file $localfile cannot be a directory");
222+
}
223+
220224
if (!file_exists(dirname($localfile))) {
221225
$this->fatal("Directory " . dirname($localfile) . " does not exist");
222226
}

0 commit comments

Comments
 (0)