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

Delete temp file on receive external files #4349

Merged
merged 1 commit into from
Aug 20, 2019
Merged

Conversation

tobiasKaminsky
Copy link
Member

@tobiasKaminsky tobiasKaminsky commented Aug 19, 2019

Fix #4341

This happens only when sharing a file to NC app:

  • temp file is created
  • file is uploaded from this temp file
  • temp file was not deleted

I set it now to "delete", meaning that the temp file is deleted.
We would also use "copy" so that the temporal file is being copied to NC app folder.
As we cannot ask user, I decided to simply do an upload.

Signed-off-by: tobiasKaminsky tobias@kaminsky.me

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@nextcloud-android-bot
Copy link
Collaborator

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/10471.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@nextcloud-android-bot
Copy link
Collaborator

Codacy

277

Lint

TypemasterPR
Warnings5858
Errors00

SpotBugs (new)

Warning TypeNumber
Bad practice Warnings24
Correctness Warnings69
Internationalization Warnings12
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings111
Security Warnings46
Dodgy code Warnings135
Total410

SpotBugs (master)

Warning TypeNumber
Bad practice Warnings24
Correctness Warnings69
Internationalization Warnings12
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings111
Security Warnings46
Dodgy code Warnings135
Total410

@codecov
Copy link

codecov bot commented Aug 20, 2019

Codecov Report

Merging #4349 into master will increase coverage by 0.28%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master    #4349      +/-   ##
============================================
+ Coverage     16.53%   16.82%   +0.28%     
  Complexity        1        1              
============================================
  Files           354      354              
  Lines         31515    31515              
  Branches       4477     4477              
============================================
+ Hits           5211     5302      +91     
+ Misses        25450    25325     -125     
- Partials        854      888      +34
Impacted Files Coverage Δ Complexity Δ
...roid/ui/activity/ReceiveExternalFilesActivity.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/com/owncloud/android/datamodel/OCFile.java 64.67% <0%> (-1.84%) 0% <0%> (ø)
.../java/com/owncloud/android/utils/DisplayUtils.java 22.97% <0%> (-1.28%) 0% <0%> (ø)
...oud/android/operations/RefreshFolderOperation.java 56.57% <0%> (-0.44%) 0% <0%> (ø)
...ncloud/android/ui/fragment/OCFileListFragment.java 24.73% <0%> (+0.26%) 0% <0%> (ø) ⬇️
.../third_parties/daveKoeller/AlphanumComparator.java 83.33% <0%> (+1.19%) 0% <0%> (ø) ⬇️
...cloud/android/ui/activity/FileDisplayActivity.java 20.19% <0%> (+1.87%) 0% <0%> (ø) ⬇️
...om/owncloud/android/utils/FileSortOrderByName.java 14.28% <0%> (+2.85%) 0% <0%> (ø) ⬇️
.../owncloud/android/ui/activity/ToolbarActivity.java 63.76% <0%> (+2.89%) 0% <0%> (ø) ⬇️
...java/com/owncloud/android/utils/FileSortOrder.java 68.75% <0%> (+3.12%) 0% <0%> (ø) ⬇️
... and 5 more

1 similar comment
@codecov
Copy link

codecov bot commented Aug 20, 2019

Codecov Report

Merging #4349 into master will increase coverage by 0.28%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master    #4349      +/-   ##
============================================
+ Coverage     16.53%   16.82%   +0.28%     
  Complexity        1        1              
============================================
  Files           354      354              
  Lines         31515    31515              
  Branches       4477     4477              
============================================
+ Hits           5211     5302      +91     
+ Misses        25450    25325     -125     
- Partials        854      888      +34
Impacted Files Coverage Δ Complexity Δ
...roid/ui/activity/ReceiveExternalFilesActivity.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/com/owncloud/android/datamodel/OCFile.java 64.67% <0%> (-1.84%) 0% <0%> (ø)
.../java/com/owncloud/android/utils/DisplayUtils.java 22.97% <0%> (-1.28%) 0% <0%> (ø)
...oud/android/operations/RefreshFolderOperation.java 56.57% <0%> (-0.44%) 0% <0%> (ø)
...ncloud/android/ui/fragment/OCFileListFragment.java 24.73% <0%> (+0.26%) 0% <0%> (ø) ⬇️
.../third_parties/daveKoeller/AlphanumComparator.java 83.33% <0%> (+1.19%) 0% <0%> (ø) ⬇️
...cloud/android/ui/activity/FileDisplayActivity.java 20.19% <0%> (+1.87%) 0% <0%> (ø) ⬇️
...om/owncloud/android/utils/FileSortOrderByName.java 14.28% <0%> (+2.85%) 0% <0%> (ø) ⬇️
.../owncloud/android/ui/activity/ToolbarActivity.java 63.76% <0%> (+2.89%) 0% <0%> (ø) ⬇️
...java/com/owncloud/android/utils/FileSortOrder.java 68.75% <0%> (+3.12%) 0% <0%> (ø) ⬇️
... and 5 more

@tobiasKaminsky tobiasKaminsky merged commit c38dcf3 into master Aug 20, 2019
@tobiasKaminsky tobiasKaminsky deleted the uploadFile branch August 20, 2019 05:38
@tobiasKaminsky tobiasKaminsky added this to the Nextcloud App 3.8.0 milestone Aug 20, 2019
@tobiasKaminsky tobiasKaminsky mentioned this pull request Aug 20, 2019
tobiasKaminsky added a commit that referenced this pull request Aug 21, 2019
b36067d Merge pull request #4294 from AlexNi245/#2216-activity-data-divers-design
9624019 activity header has now the same font size as a activity element
fa11565 fixed issue  Avoid reassigning parameters such as 'itemPosition'
5a3db5e replace do while loop in getHeaderPositionForItem with while loop
1dd2a5a change naming of Canvas c to Canvas canvas
f4e964e change class name of ActivityListItemDecoration to StickyHeaderItemDecoration, which is more generic
52a7ffe add license text
6ffa9d0 remove duplicate entry of setContentView
cdd5d38 add getHeaderPositionForItem unit test
0ac5a8b add static import for com.owncloud.android.lib.resources.activities.model.Activity;
4ea9667 unit test for isHeader(int pos)
b61f9e0 format ActivityListAdapter
9012f43 set visibility from ActivityViewHeaderHolder back to protected
7a30070 remove unnecessary TAG field and replace nested if statement with && to fix codeacy-bot issues
a26a895 apply changes to java doc
c41dd38 optimize imports
b4764f7 remove unnecessary files
792a6b9 finish implementation of sticky header implementation. This feature was created according to the this implementation : https://stackoverflow.com/questions/32949971/how-can-i-make-sticky-headers-in-recyclerview-without-external-lib
13e7aff increase height of header element and set backgroundcolor to white
a184345 first implementation of sticky header logic.
cd3d8dc start to implement sticky header behavior
259e106 Merge pull request #4355 from nextcloud/drawer
caf1842 drawer: show only server address
cb7d4a3 revert to old image (#4356)
7e44fec revert to old image
f7c4eec Merge pull request #4345 from nextcloud/push
a3fda5a no need to use owncloudClient
9a023c6 Check if app is excluded from battery optimization (#3589)
527c5db Use conscrypt (#4314)
6014e90 use conscrypt
5373660 Provide a banal 'paste' postmessage implementation. (#4189)
68cebf8 revert DeviceModule back to Kotlin
969ce78 Drone: update FindBugs results to reflect reduced error/warning count [skip ci]
f26095f Merge pull request #4245 from fogninid/fixUploadListComparator
e72a789 show on special vendors "disable power check" in auto upload menu - tint button - change logic when to show battery warning
c8173c3 Use reloading on photo view (#2250)
c38dcf3 Delete temp file on receive external files (#4349)
c155edf Merge pull request #4347 from nextcloud/blacklistThumbnail
a03ff84 daily dev 20190820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tmp folder size grow by 'send to nextcloud' upload
3 participants