nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.74k stars 4k forks source link

When creating a new folder give a hint that folder names starting with dots might be hidden #21609

Open derhansen opened 4 years ago

derhansen commented 4 years ago

Describe the bug

When I create a folder starting with multiple dots (at least 3), it gets created but is not visible.

Steps to reproduce

  1. Create a folder named ... folder with dots
  2. The folder gets created in the file system
  3. The folder is not visible in the web ui

Expected behaviour

The folder should be visible

Actual behaviour

Folder is not visible

Server configuration

Operating system: Ubuntu 18.04

Web server: nginx

Database: mariadb

PHP version: 7.3

Nextcloud version: 18.06

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from:

violoncelloCH commented 4 years ago

could you check in the settings in the lower left section of the files UI, if "show hidden files" is selected or not? files or folders starting with a . (dot) are treated as hidden, as they are with any UNIX like OS

derhansen commented 4 years ago

Thanks a lot. When I select "Show hidden files" the folder is shown. I was not aware of this option. I would suggest to enable this setting by default to avoid confusion.

violoncelloCH commented 4 years ago

well no, I wouldn't say so, as this would probably confuse much more people then because synced and on OS level hidden files would then be visible in Nextcloud... I guess the better approach would be to show a hint/warning when a user enters a . (dot) as first character for a new folder name (and on rename as well); what do you think @nextcloud/designers

marcoambrosini commented 4 years ago

The warning is already present for /\./, we can extend it to /\..+/ so that any string that starts with a dot is matched

Screenshot from 2020-07-15 06-28-08

juliushaertl commented 4 years ago

As i understand it is not about an invalid filename but about giving a hint that the folder might be hidden for a name like "...test".