fixed detection of server version in cmd client similar to gui client:
authorPatrick Cernko <errror@errror.org>
Tue, 5 Sep 2023 04:11:54 +0000 (06:11 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 7 Sep 2023 02:32:33 +0000 (02:32 +0000)
commit80be0bec3d8efd79ee06df0fd15fc21822e05677
tree7b883a3929cee60500de7a7b8d78930c724a441a
parent1d8e64dbc3bc9d227ece60a97c6c5d274c14affd
fixed detection of server version in cmd client similar to gui client:

first check status.php for version and then capabilities, only use version string if not empty

this also fixes 'File names containing the character ":" are not supported on this file system.' errors in nextcloudcmd (on Linux): The invalidFilenameRegex was set to a static default in case the server version was not set correctly. As newer versions of nextcloud do not return the version in capabilities but status.php, the server version was empty.

Signed-off-by: Patrick Cernko <errror@errror.org>
src/cmd/cmd.cpp