Hello,
this code
works well in Debug Mode, but results in an exception when running in Release Mode.
Exception is:
This seems to be a bug...!?
How can I get around it?
Best regards,
Carsten
this code
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim quelldir, targetdirectory, quellfile, file1 As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
quellfile = "2012_Programm.pdf"
file1 = "2012_Programm.pdf"
quelldir = "/sdcard/download"
targetdirectory = "/sdcard/external_sd/Documents"
File.Copy(quelldir, quellfile, targetdirectory, file1)
End Sub
works well in Debug Mode, but results in an exception when running in Release Mode.
Exception is:
B4X:
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /mnt/sdcard/external_sd/Documents/2012_Programm.pdf: open failed: EACCES (Permission denied)
This seems to be a bug...!?
How can I get around it?
Best regards,
Carsten