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

crash when cutting a folder and paste in it #1796

Closed
anlalalu opened this issue Dec 24, 2019 · 1 comment · Fixed by #1915
Closed

crash when cutting a folder and paste in it #1796

anlalalu opened this issue Dec 24, 2019 · 1 comment · Fixed by #1915
Labels
Area-FileOperations Related to file operations (e.g. moving, copying, renaming). Issue-Bug Related unexpected behavior or something worth investigating. Issue-Severe (high) Showstopper issues that require immediate attention

Comments

@anlalalu
Copy link

Describe the bug
crash when cutting a folder and paste in it

To Reproduce
Steps to reproduce the behavior:

  1. create a folder(named 'test2') in an empty folder
  2. long click 'test2' folder
  3. tap 'cut'
  4. click 'test2' folder to go into the folder
  5. tap 'paste'

Screenshots
Screen Shot1

Screen Shot2

Smartphone (please complete the following information):

  • Device: emulator
  • OS: Android 4.4.4
  • Rooted: No
  • Version: 3.3.2

Stack Trace
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.amaze.filemanager, PID: 1327
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.amaze.filemanager.asynchronous.asynctasks.DeleteTask.onPostExecute(DeleteTask.java:175)
at com.amaze.filemanager.asynchronous.asynctasks.DeleteTask.onPostExecute(DeleteTask.java:51)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)

@TranceLove
Copy link
Collaborator

So it means we need to prevent user from cut-pasting a folder within itself.

@TranceLove TranceLove added the Issue-Bug Related unexpected behavior or something worth investigating. label Dec 26, 2019
@EmmanuelMess EmmanuelMess added Area-FileOperations Related to file operations (e.g. moving, copying, renaming). Issue-Severe (high) Showstopper issues that require immediate attention labels Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-FileOperations Related to file operations (e.g. moving, copying, renaming). Issue-Bug Related unexpected behavior or something worth investigating. Issue-Severe (high) Showstopper issues that require immediate attention
Projects
None yet
3 participants