Skip to content

[Bug]: Windows max path length=260 symbols limitation #4227

@pmelikov

Description

@pmelikov

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

When the path length is >=260 characters in Microsoft Edge on Win 11, Nextcloud successfully transfers all files and folders with normal path lengths, but instead of files whose path exceeds 260 characters, it creates a NotFoundError file in the root directory with the content: "NotFoundError: A requested file or directory could not be found at the time an operation was processed.".
This is because on Windows the maximum allowed path length is 260 characters, as opposed to 4096 characters on Linux.

Steps to reproduce

  1. Create folder named "111..." with long path, for example, "C:\Users\XXXXX\Downloads\1111111111111111111111111111111111111111111111111111\22222222222222222222222222222222222222222222222222222222\3333333333333333333333333333333333333333333333333333333333333333333333333\my_file4444444444444444444444444444444444444444.yml"
  2. Try to upload this folder with all its files
  3. And instead file "my_file444" near root "111..." Nextcloud with create file "NotFoundError"

Expected behavior

This is not an informative error message, and is there any point in uploading all other files from the download directory if some "inappropriate files" are skipped?
Perhaps it's better to add a warning "The file path is too long! Ignore the file and uploadi everything else?" instead of creating "NotFoundError" file in root folder.

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Nginx

Database engine version

MySQL

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

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

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

Configuration report

it is not necessary. Its just Windows client limitation

List of activated Apps

it is not necessary. Its just Windows client limitation

Nextcloud Signing status

it is not necessary. Its just Windows client limitation

Nextcloud Logs

it is not necessary. Its just Windows client limitation

Additional info

it is not necessary. Its just Windows client limitation

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions