Skip to content

fix(cli): Abort early if file does not exist#899

Merged
come-nc merged 1 commit intomainfrom
fix/early-bail-out-on-non-existing-file
May 27, 2025
Merged

fix(cli): Abort early if file does not exist#899
come-nc merged 1 commit intomainfrom
fix/early-bail-out-on-non-existing-file

Conversation

@come-nc
Copy link
Copy Markdown
Collaborator

@come-nc come-nc commented May 27, 2025

The message is confusing when the archive file does not exist.

See #853

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc self-assigned this May 27, 2025
@come-nc come-nc added the 3. to review Waiting for reviews label May 27, 2025
@come-nc
Copy link
Copy Markdown
Collaborator Author

come-nc commented May 27, 2025

/backport to stable31

@backportbot backportbot Bot added the backport-request A backport was requested for this pull request label May 27, 2025
@come-nc come-nc requested review from artonge and susnux May 27, 2025 09:15
Comment thread lib/Command/Import.php

try {
$path = $input->getArgument('archive');
if (!file_exists($path)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work with S3 as primary storage?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a local zip file that we are importing from.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

occ user:import /path/to/my/file.zip

@come-nc come-nc merged commit 8e46f74 into main May 27, 2025
40 checks passed
@come-nc come-nc deleted the fix/early-bail-out-on-non-existing-file branch May 27, 2025 13:05
@backportbot backportbot Bot removed the backport-request A backport was requested for this pull request label May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants