Bug 96771

Summary: Android: Viewer cannot open owncloud files which have spaces in filename (crash)
Product: LibreOffice Reporter: Faruk Uzun <farukuzun>
Component: Android ViewerAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: major CC: raal, xiscofauli
Priority: medium    
Version: 5.2.0.0.alpha0+   
Hardware: All   
OS: Android   
Whiteboard: target:5.3.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 96786    
Attachments: Logs from crash

Description Faruk Uzun 2015-12-29 11:48:04 UTC
Created attachment 121596 [details]
Logs from crash

When I try to open a file which have a name like "x y z.odt" from my owncloud server, app crashes instantly. 

Steps to Reproduce

1) Connect to an owncloud server
2) Try to open a file which have spaces in filename

Logs on the attachement.
Comment 1 Faruk Uzun 2015-12-29 12:11:54 UTC
Btw, ownCloud 8.1 is running on my server
Comment 2 raal 2016-05-07 14:40:16 UTC
I can confirm with 5.2, android 4.4

Tested on demo.owncloud.org , file 'demo textfile - licence.txt'


Log:
java.lang.IllegalArgumentException: Illegal character in path at index 5: /Demo Textfile - License.txt
	at java.net.URI.create(URI.java:727)
	at org.libreoffice.storage.owncloud.OwnCloudFile.getUri(OwnCloudFile.java:42)
	at org.libreoffice.ui.LibreOfficeUIActivity$7.onPostExecute(LibreOfficeUIActivity.java:388)
	at org.libreoffice.ui.LibreOfficeUIActivity$7.onPostExecute(LibreOfficeUIActivity.java:354)
	at android.os.AsyncTask.finish(AsyncTask.java)
	at android.os.AsyncTask.access$600(AsyncTask.java)
	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java)
	at android.os.Handler.dispatchMessage(Handler.java)
	at android.os.Looper.loop(Looper.java)
	at android.app.ActivityThread.main(ActivityThread.java)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
	at dalvik.system.NativeStart.main(Native Method)
Comment 3 Commit Notification 2016-08-28 07:14:22 UTC
Mert Tumer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5bdea25f681fb252967f99a22a38cce6be3c0b48

tdf#96771 - bug fix for owncloudfiles with white space characters

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Xisco FaulĂ­ 2016-10-03 10:01:35 UTC
Hello,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?