nextcloud / nextcloud/server

[Bug]: Folder duplication after renaming & internal links not permanent

Open
#58,388 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 32-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

When I renamed folders from for ex. "🚨 Important" to "1. 🚨 Important", Nextcloud kept an empty "🚨 Important" folder that I couldn't delete. In order to get rid of this empty unwanted "🚨 Important" folder, I had to move the actual "1. 🚨 Important" folder to a new folder, then delete the folder superior to the empty "🚨 Important" folder.

Furthermore, when I rename a superior folder from "Projects" to for instance "🗓️ Projects", internal links to files inside that renamed folder stop working. Shouldn't "internal links" stay the same forever, until the file is deleted? It's not practical if internal links to files inside a folder stop working, just because the containing folder is renamed.

(In case that symbols inside folder or file names are the problem, they should be forbidden in Nextcloud. But I hope they are not, as symbols are a very nice way to create more overview and easiness of understanding.)

Steps to reproduce
  1. Rename a folder (add a number before a symbol in its name)
  2. An empty folder with the old name is preserved that cannot be deleted
  3. Add a symbol to a folder's name and internal links to files or folders within that folder stop working
Expected behavior
  1. If a folder or file is renamed, no undeletable copy with the old name should be created
  2. Internal links to files or folders should stay permanent, no matter if superior folders are renamed or if files or folders are moved to another folder
Nextcloud Server version

32

Operating system

Other

PHP engine version

Other

Web server

Other

Database engine version

Other

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

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

I'm using a Managed Nextcloud from a known German hoster, which was recently upgraded to version Nextcloud Hub 10 (31.0.13), which didn't solve the problem.

As it's a managed Nextcloud server, unfortunately I don't know details like server os or php version.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing both behaviors from the listed steps: rename a folder with a symbol or prefix, then check for an undeletable old folder and test links into the renamed folder. Trace the server-side rename and internal-link handling involved. Done means renames create no undeletable duplicate and links remain usable after renames or moves.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.