Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance error message when failing to sync file due to illegal filename #2711

Closed
hnicke opened this issue Jun 14, 2018 · 5 comments · Fixed by #11384
Closed

Enhance error message when failing to sync file due to illegal filename #2711

hnicke opened this issue Jun 14, 2018 · 5 comments · Fixed by #11384
Assignees

Comments

@hnicke
Copy link

hnicke commented Jun 14, 2018

I accidentally had a directory in my nextcloud which contained a colon in its filename, e.g. tro:lol. Btw, this is totally legal in unix and I think in OSX, aswell.

When trying to sync the folder (to the fat32 sdcard) with the android client, i get an error message.

Actual behaviour

  • A notification is sent:
Download failed
Could not download tro:lol

In case a directory contains a colon, the dir including it's content does not sync.
In case a file contains the colon, the file is not synced.

Expected behaviour

  • As far as I know the sync to external SD card can't work because on fat32, : is a reserved char. The error message should be more specific, e.g.:
Download failed
Could not download tro:lol : Illegal filename

Steps to reproduce

  1. Create files on workstation in synced nextcloud folder: mkdir tro:lol; cd tro:lol; touch 1 2 3
  2. wait till on server
  3. in Android app, select the three dots of the tro:lol entry and select Sync.

Environment data

Android version: 7.1.2

Device model: Samsung S5 (klte)

Stock or customized system: LineageOs (microg)

Nextcloud app version: 3.1.0

Nextcloud server version: 13.0.2-1

@tobiasKaminsky
Copy link
Member

Correct, we can enhance the error message, but the underlying error we cannot change…

@hnicke hnicke changed the title File/dir with colon : in name can not be synced Enhance error message when failing to sync file due to illegal filename Jun 15, 2018
@stale
Copy link

stale bot commented May 10, 2019

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label May 10, 2019
@stale stale bot closed this as completed May 24, 2019
@dschrempf
Copy link

Hi,

I bumped into this issue and I think it should be reopened.

The logcat is:


Download of /Data/Music/kinderlieder/Nadja Karasjew/Spatzenschwatzen, Ein Höchst Musikalisches Hörspiel/01 - Intro: Der Kleine Weltenentdecker 1.mp3 to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/dominik@fazky.duckdns.org/Data/Music/kinderlieder/Nadja Karasjew/Spatzenschwatzen, Ein Höchst Musikalisches Hörspiel/01 - Intro: Der Kleine Weltenentdecker 1.mp3: Unrecovered transport exception
java.io.IOException: Operation not permitted
	at java.io.UnixFileSystem.createFileExclusively0(Native Method)
	at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)
	at java.io.File.createNewFile(File.java:1008)
	at com.owncloud.android.lib.resources.files.DownloadFileRemoteOperation.downloadFile(DownloadFileRemoteOperation.java:113)
	at com.owncloud.android.lib.resources.files.DownloadFileRemoteOperation.run(DownloadFileRemoteOperation.java:88)
	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:184)
	at com.owncloud.android.operations.DownloadFileOperation.run(DownloadFileOperation.java:168)
	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:184)
	at com.owncloud.android.files.services.FileDownloader.downloadFile(FileDownloader.java:464)
	at com.owncloud.android.files.services.FileDownloader.access$500(FileDownloader.java:84)
	at com.owncloud.android.files.services.FileDownloader$ServiceHandler.handleMessage(FileDownloader.java:418)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.os.HandlerThread.run(HandlerThread.java:67)

Download of /Data/Music/kinderlieder/Nadja Karasjew/Spatzenschwatzen, Ein Höchst Musikalisches Hörspiel/01 - Intro: Der Kleine Weltenentdecker 1.mp3 to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/dominik@fazky.duckdns.org/Data/Music/kinderlieder/Nadja Karasjew/Spatzenschwatzen, Ein Höchst Musikalisches Hörspiel/01 - Intro: Der Kleine Weltenentdecker 1.mp3: Unrecovered transport exception

@tobiasKaminsky
Copy link
Member

To do

  • provide meaningful error message, e.g. "File cannot be downloaded due to illegal characters. Rename on server"?
  • if yes -> offer rename dialog, which then renames file/folder directly on server

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Jan 24, 2023

@tobiasKaminsky,

To do:

  • provide meaningful error message, e.g. "File cannot be downloaded due to illegal characters. Rename on server"?
  • if yes -> offer rename dialog, which then renames file/folder directly on server.

is probably better. Just for future reference.

Anyway, I totally agree. QOL improvements like that are what make people choose certain software. I know that without that, my family wouldn't understand the problem nor how to remediate it.

I'm merely lucky that thus far they've only used ASCII characters for filenames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants