mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-29 01:34:31 +01:00
Critical bug: could not move threads/posts with spoiler images, resulted in I/O error
This commit is contained in:
parent
dc943a91fc
commit
ceb257a9bd
@ -1054,8 +1054,10 @@ function mod_move_reply($originBoard, $postID) {
|
||||
if ($post['has_file']) {
|
||||
// move the image
|
||||
rename($file_src, sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
|
||||
if ($post['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
|
||||
rename($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
|
||||
}
|
||||
}
|
||||
|
||||
buildIndex();
|
||||
|
||||
@ -1146,8 +1148,10 @@ function mod_move($originBoard, $postID) {
|
||||
if ($post['has_file']) {
|
||||
// copy image
|
||||
$clone($file_src, sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
|
||||
if ($post['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
|
||||
$clone($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
|
||||
}
|
||||
}
|
||||
|
||||
// go back to the original board to fetch replies
|
||||
openBoard($originBoard);
|
||||
|
Loading…
Reference in New Issue
Block a user