meganz / MEGAcmd

Command Line Interactive and Scriptable Application to access MEGA
Other
1.93k stars 406 forks source link

When starting mega-cmd-server, the same file will be continuously overwritten with older versions. #977

Open andruska opened 4 months ago

andruska commented 4 months ago

MEGAcmd version

1.6.3

Operating System/Platform

Linux

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

Archlinux

Steps

Mega account versioning is turned on.

$ mega-sync [Initiating MEGAcmd server in background. Log: /home/user/.megaCmd/megacmdserver.log] Resuming session ...

Expected behavior

Would it be possible to synchronize only the latest valid version? I would not like to delete the old versions.

Actual behavior

If to start the mega-cmd-server, it starts synchronizing arbitrary old versions (1st ... 6th in the log below) continuously overwriting the same file. Finally synchronizes the last valid version (7th).


$ mega-ls /MEGAsync/file -a --versions
MEGAsync/file (41.00 B)

  file#1715252337[file] (Thu, 09 May 2024 13:58:57 +0300) (41.00 B) >>>>> 7.
  file#1715216641[file] (Thu, 09 May 2024 04:04:01 +0300) (41.00 B)
  file#1715212098[file] (Thu, 09 May 2024 02:48:18 +0300) (41.00 B)
  file#1715211947[file] (Thu, 09 May 2024 02:45:47 +0300) (41.00 B) >>>>> 6.
  file#1715211837[file] (Thu, 09 May 2024 02:43:57 +0300) (41.00 B)
  file#1715211824[file] (Thu, 09 May 2024 02:43:44 +0300) (41.00 B)
  file#1715211815[file] (Thu, 09 May 2024 02:43:35 +0300) (41.00 B) >>>>> 5.
  file#1715209668[file] (Thu, 09 May 2024 02:07:48 +0300) (41.00 B)
  file#1715208969[file] (Thu, 09 May 2024 01:56:09 +0300) (41.00 B) >>>>> 4.
  file#1715208848[file] (Thu, 09 May 2024 01:54:08 +0300) (41.00 B)
  file#1715208645[file] (Thu, 09 May 2024 01:50:45 +0300) (41.00 B)
  file#1715208379[file] (Thu, 09 May 2024 01:46:19 +0300) (41.00 B)
  file#1715208215[file] (Thu, 09 May 2024 01:43:35 +0300) (41.00 B) >>>>> 3.
  file#1715208210[file] (Thu, 09 May 2024 01:43:30 +0300) (41.00 B) >>>>> 2.
  file#1715208125[file] (Thu, 09 May 2024 01:42:05 +0300) (41.00 B)
  file#1715204079[file] (Thu, 09 May 2024 00:34:39 +0300) (41.00 B)
  file#1715203870[file] (Thu, 09 May 2024 00:31:10 +0300) (41.00 B) >>>>> 1.
  file#1715195063[file] (Wed, 08 May 2024 22:04:23 +0300) (41.00 B)