Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync output gives less info than the return value #1021

Open
gidici opened this issue Jan 12, 2025 · 1 comment
Open

sync output gives less info than the return value #1021

gidici opened this issue Jan 12, 2025 · 1 comment
Labels

Comments

@gidici
Copy link

gidici commented Jan 12, 2025

MEGAcmd version

1.7.0

Operating System/Platform

Linux

Platform version. In the case of Linux, please enter the Linux distribution you are using.

Debian 12

Steps

I start mega-sync; e.g. mega-sync "/media/Dati/Corsi di Lingue" /bks
If I repeat the same command, mega-sync prints an error message (ok): "Failed to sync folder: Already exists. Active sync same path".
The command echo $? returns 12 and mega-sync without arguments gives STATUS=Syncing, ERROR=NO
Ok; it's not really an error.
If I give a non-existent directory, e.g. mega-sync "/media/Dati/Corsi di Lingue" /bks333 I get the error message "Couldn't find remote folder: /bks333"; echo $? returns 53, while mega-sync without arguments returns an empty string.

Expected behavior

In my example case, I expect that mega-sync without arguments gives ERROR=YES.
Maybe I'm wrong. If so, when shoud I see ERROR=YES?

Actual behavior

The output of echo $? and mega-sync give different iformation.

@gidici gidici added the bug label Jan 12, 2025
@polmr
Copy link
Collaborator

polmr commented Jan 17, 2025

mega-sync

lists the syncs and their status. Empty if no syncs are configured. If there are configured sync, they are listed with information about their estatus. One field is ERROR. It would be NO unless that particular sync has experienced a problem.

mega-sync localpath remotepath

Attempts to establish a new sync, and reporting an error in case that failure. The error code will be different depending on the cause of the failure. Possible failure reasons are:

  • there already exist a sync configured for that localpath
  • the remote path does not exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants