Skip to content

Improve Client AutoRename Logic #106

@alperozturk96

Description

@alperozturk96

Clients are currently automatically renaming files that contain forbidden filename characters or forbidden filename extensions. This feature is only available in Nextcloud 30 and above.

After filtering out forbidden filename characters and extensions, clients also need to remove non-printable Unicode characters and convert filenames to UTF-8 to ensure Windows compatibility. Currently, this automatic renaming occurs without notifying the user.

However, the lists of forbidden characters and extensions are never empty:

  • Forbidden filename characters: [ "\\", "/", "\\", "/" ]
  • Forbidden filename extensions: [ ".filepart", ".part", ".part" ]

As a result, clients cannot rely solely on these lists to determine whether auto-renaming should be applied. While clients could hardcode these values and attempt to skip renaming if they match, the ideal solution would be to have a boolean flag provided by the server.

Both iOS and Android clients are affected by this issue, and multiple related problems have required fixes. On desktop clients, the logic for determining whether to auto-rename is currently based on the following condition, which is not reliable.

Image

I suggest we discuss this topic further to reach a clear conclusion on the best approach moving forward.

@AndyScherzinger @tobiasKaminsky @mpivchev @mgallien

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions