Skip to content

Commit

Permalink
Bugfix: before fsck will queue a new write operation, ensure all past…
Browse files Browse the repository at this point in the history
…s Samba-spooled operations have been added to the tasks queue
  • Loading branch information
gboudreau committed Dec 24, 2024
1 parent e050aa6 commit ac568e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/Tasks/FsckTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ public function gh_fsck_file($path, $filename, $file_type, $source, $share, $sto
if($storage_path === FALSE) {
// Let's just add a 'write' task for this file; if it's a duplicate of an already pending task, it won't be processed twice, since the simplify function will remove such duplicates.
Log::info("$path/$filename is a file (not a symlink). Adding a new 'write' pending task for that file.");
SambaSpool::parse_samba_spool();
WriteTask::queue($share, clean_dir("$file_path/$filename"));
return;
}
Expand Down Expand Up @@ -680,6 +681,7 @@ public function gh_fsck_file($path, $filename, $file_type, $source, $share, $sto
Trash::trash_file("$landing_zone/$file_path/$filename");
} else if (gh_is_file("$landing_zone/$file_path/$filename")) {
Log::info("$share/$file_path/$filename is a file (not a symlink). Adding a new 'write' pending task for that file.");
SambaSpool::parse_samba_spool();
WriteTask::queue($share, empty($file_path) ? $filename : clean_dir("$file_path/$filename"));
}
if ($this->has_option(OPTION_DEL_ORPHANED_METADATA)) {
Expand Down

0 comments on commit ac568e0

Please sign in to comment.