change name for temp directory from hard-coding

RESOLVED FIXED in Firefox 16

Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rkd, Assigned: rkd)

Tracking

16 Branch
Firefox 16
x86
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
Assignee: nobody → blyakher.a
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Comment 1

5 years ago
Created attachment 640812 [details] [diff] [review]
change name for temp directory for image sharing

addresses https://bugzilla.mozilla.org/show_bug.cgi?id=769438#c9
Attachment #640812 - Flags: review?(mark.finkle)
Attachment #640812 - Flags: review?(mark.finkle) → review+
Comment on attachment 640812 [details] [diff] [review]
change name for temp directory for image sharing

Review of attachment 640812 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/GeckoApp.java
@@ +2308,5 @@
>  
>      // Get/Create a temporary direcory
>      public static File getTempDirectory() {
>          File sdcard = Environment.getExternalStorageDirectory();
> +        File dir = new File(sdcard.getAbsolutePath(), GeckoApp.mAppContext.getPackageName());

File dir = mAppContext.getExternalFilesDir("temp");
Attachment #640812 - Flags: review+ → review-
(Assignee)

Comment 3

5 years ago
Created attachment 640827 [details] [diff] [review]
change name for temp directory for image sharing
Attachment #640812 - Attachment is obsolete: true
Attachment #640827 - Flags: review?(mark.finkle)
Component: General → General
Product: Firefox → Firefox for Android
Version: 16 Branch → unspecified
Comment on attachment 640827 [details] [diff] [review]
change name for temp directory for image sharing

I assume this works for "sharing" files. Why not just remove getTempDirectory() and use mAppContext.getExternalFilesDir("temp") directly?

r+ if blassey likes this too
Attachment #640827 - Flags: review?(mark.finkle)
Attachment #640827 - Flags: review?(blassey.bugs)
Attachment #640827 - Flags: review+
(Assignee)

Comment 5

5 years ago
(In reply to Mark Finkle (:mfinkle) from comment #4)
> Comment on attachment 640827 [details] [diff] [review]
> change name for temp directory for image sharing
> 
> I assume this works for "sharing" files. Why not just remove
> getTempDirectory() and use mAppContext.getExternalFilesDir("temp") directly?
> 
> r+ if blassey likes this too

This makes a "temp" folder in the external files dir, so that we can reuse that directory for storing other things and not worry about deleting files outside of that /temp.
Assignee: blyakher.a → nobody
Version: unspecified → Firefox 16
(Assignee)

Updated

5 years ago
Assignee: nobody → blyakher.a
Attachment #640827 - Flags: review?(blassey.bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd48fae38214
Target Milestone: --- → Firefox 16

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/cd48fae38214
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Depends on: 773943
You need to log in before you can comment on or make changes to this bug.