Ignore backups folder exists when uploading

This commit is contained in:
2026-02-11 02:13:11 +02:00
parent a566a2ae64
commit 070e46cf77

View File

@@ -260,8 +260,14 @@ class DirectAdminMigration extends Page implements HasActions, HasForms
])); ]));
} }
// Ensure backups folder exists // Ensure backups folder exists (mkdir will error if it already exists).
$this->getAgent()->fileMkdir($user->username, 'backups'); try {
$this->getAgent()->fileMkdir($user->username, 'backups');
} catch (Exception $e) {
if ($e->getMessage() !== 'Path already exists') {
throw $e;
}
}
// Stage into the agent-allowed temp dir, then let the agent move it. // Stage into the agent-allowed temp dir, then let the agent move it.
$tmpDir = '/tmp/jabali-uploads'; $tmpDir = '/tmp/jabali-uploads';