Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ebfeab5

Browse files
committed
up: update copyDir in the file tree builder
1 parent 1ad0551 commit ebfeab5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎src/Directory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ private static function doCopy(string $oldDir, string $newDir, array $options):
344344
@chmod($new, 0664); // 权限 0777
345345

346346
if ($afterFn = $options['afterFn']) {
347-
$afterFn($new);
347+
$afterFn($new, $old);
348348
}
349349
}
350350
}

‎src/Extra/FileTreeBuilder.php‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@ public function copyDir(string $srcDir, string $dstDir, array $options = []): st
181181
return !File::isExclude($oldFile, $options['exclude']);
182182
},
183183
'beforeFn' => function (string $oldFile, string $newFile): bool {
184-
$this->printMsgf('- copy file %s -> %s', $oldFile, $newFile);
184+
// $this->printMsgf('- copy file %s -> %s', $oldFile, $newFile);
185185
return !$this->dryRun;
186186
},
187-
'afterFn' => function (string $newFile) use ($options) {
187+
'afterFn' => function (string $newFile, string $oldFile) use ($options) {
188+
$this->printMsgf('- copy file %s -> %s', $oldFile, $newFile);
188189
if ($patterns = $options['renderOn']) {
189190
$this->renderOnMatch($newFile, $patterns);
190191
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /