server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: When moving a folder, no merge dialog appears if the folder names are the same.

Open UteHaus opened this issue 1 year ago • 4 comments

⚠️ This issue respects the following points: ⚠️

Bug description

When I move a folder with name d1 in a new destination where a folder with the same name (d1) exist, there came non merge dialog. If the two folders have different contents, these are overwritten by the contents to be moved.

Steps to reproduce

  1. Open files App
  2. select folder d1
  3. run action copy or move
  4. select destination folder
  5. run move action

Expected behavior

Wenn die Inhalte der gleich namigen Ordner die Aktion verschieben ausgeführt wird sollte der zusammenführen Dialog erscheinen. Mit dem man ein überschreiben oder zusammenführen der Ordner Auswählen kann.

Installation method

Community Docker image

Nextcloud Server version

28

Operating system

Other

PHP engine version

None

Web server

Other

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "filelocking.enabled": true,
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "...."
        ],
        "overwrite.cli.url": "https:\/\/cloud.com",
        "overwriteprotocol": "https",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "28.0.2.5",
        "dbtableprefix": "oc_",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "loglevel": 2,
        "log_type": "file",
        "syslog_tag": "",
        "logdateformat": "F d, Y H:i:s",
        "logfile": "",
        "maintenance": false,
        "default_phone_region": "DE",
        "onlyoffice": {
            "verify_peer_off": true
        },
        "app_install_overwrite": [
            "initialcheck",
            "limit_login_to_ip",
            "radio",
            "tasks",
            "occweb",
            "files_reader",
            "files_ebookreader",
            "polls",
            "contacts",
            "drawio",
            "checksum",
            "rainloop",
            "timetracker",
            "passman",
            "calendar",
            "cookbook",
            "dashboardcharts",
            "apporder",
            "bookmarks",
            "passwords",
            "carnet",
            "electronicsignatures",
            "ocdownloader",
            "files_bpm",
            "gestion",
            "audioplayer_editor",
            "news"
        ],
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\Illustrator"
        ],
        "app.mail.imap.timeout": 20,
        "app.mail.smtp.timeout": 2,
        "app.mail.verify-tls-peer": "false",
        "has_rebuilt_cache": true,
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "updater.release.channel": "stable",
        "data-fingerprint": "98",
        "auth.bruteforce.protection.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

UteHaus avatar Feb 09 '24 17:02 UteHaus

Cc @nextcloud/server-frontend

szaimen avatar Feb 11 '24 17:02 szaimen

I remember seeing a PR similar to changing the names of copied / moved folders and checking for duplicate names, so all that would needed to add is a dialog prompt 👍 will assign myself to this

emoral435 avatar Feb 14 '24 13:02 emoral435

@emoral435 I think we need to add here:

https://github.com/nextcloud/server/blob/79f5cf2790c4e9110e18bbd830e252a1aec96ef3/apps/files/src/actions/moveOrCopyAction.ts#L136

The same like here:

https://github.com/nextcloud/server/blob/79f5cf2790c4e9110e18bbd830e252a1aec96ef3/apps/files/src/actions/moveOrCopyAction.ts#L119-L122

But instead of just making the name unique one could show the file conflict dialog from @nextcloud/upload. what ever suits you best :)

susnux avatar Feb 14 '24 23:02 susnux

@susnux Sorry for getting back to this late, but I like this solution that you layed out. Beginning to develop it! They PR I referenced was indeed yours as well so this input is incredibly appreciated! :)

emoral435 avatar Feb 16 '24 02:02 emoral435