QuantumBadger / QuantumBadger/RedReader

Saving media fails if target directory doesn't exist

Open
#654 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.7k
Forks
527
Avg merge
20d 10h
Merged PRs (30d)
3

Description

As stated in the title, saving media fails if the folder RedReader is targeting isn't present.

Exception:

/storage/emulated/0/Pictures/bm007jljjlg21.png (No such file or directory)
  java.io.FileOutputStream.open0(Native Method)
  java.io.FileOutputStream.open(FileOutputStream.java:287)
  java.io.FileOutputStream.<init>(FileOutputStream.java:223)
  java.io.FileOutputStream.<init>(FileOutputStream.java:171)
  org.quantumbadger.redreader.common.General.copyFile(General.java:128)
  org.quantumbadger.redreader.image.SaveImageCallback$1$1.onSuccess(SaveImageCallback.java:144)
  org.quantumbadger.redreader.cache.CacheRequest.notifySuccess(CacheRequest.java:231)
  org.quantumbadger.redreader.cache.CacheManager$RequestHandlerThread$1.run(CacheManager.java:491)
  org.quantumbadger.redreader.common.PrioritisedCachedThreadPool$Executor.run(PrioritisedCachedThreadPool.java:104)
  java.lang.Thread.run(Thread.java:764)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with org.quantumbadger.redreader.common.General.copyFile at General.java:128 and trace the call from SaveImageCallback.java:144. Reproduce saving media when /storage/emulated/0/Pictures is absent; done means the media saves successfully instead of raising FileNotFoundException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.