Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3973 closed defect (fixed)

Cancel a download do not free the space

Reported by: humitos Owned by: humitos
Priority: Urgent Milestone:
Component: Browse Version: Unspecified
Severity: Blocker Keywords: patch, r+, olpc-test-passed
Cc: manuq, godiard Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

  1. Remove all existent data:
    rm -rf /home/humitos/.sugar/default/org.laptop.WebActivity
    
  2. Open a new instance of Browse
  3. Check how much space it is using
    $ du -hs /home/humitos/.sugar/default/org.laptop.WebActivity
    96K	/home/humitos/.sugar/default/org.laptop.WebActivity
    
  4. Start downloading a big file. For example this one:
  5. After a couple of minutes (depending on your internet connection) go to the Journal and cancel the download
  6. Check the space that Browse is using again
    $ du -hs /home/humitos/.sugar/default/org.laptop.WebActivity
    13M	/home/humitos/.sugar/default/org.laptop.WebActivity
    

This space is never free...

Attachments (3)

0001-Remove-temporary-downloaded-cancelled-files-SL-3973.patch (2.5 KB) - added by humitos 9 years ago.
0001-Remove-temporary-downloaded-cancelled-files-SL-3973.2.patch (2.9 KB) - added by humitos 9 years ago.
v2 - adds uptime check
0001-Remove-temporary-downloaded-cancelled-files-SL-3973.3.patch (2.7 KB) - added by humitos 9 years ago.
v3 - with some modification indicated by Martin

Download all attachments as: .zip

Change History (12)

comment:1 Changed 9 years ago by humitos

The files are saved temporally with this kind of file name: .goutputstream-*

[humitos@michifus org.laptop.WebActivity]$ ls -lah instance
total 304M
drwxrwxr-x. 2 humitos humitos 4.0K Oct  1 12:44 .
drwxrwxr-x. 5 humitos humitos 4.0K Oct  1 12:31 ..
-rw-------. 1 humitos humitos  15M Oct  1 12:42 .goutputstream-166FLW
-rw-------. 1 humitos humitos 277M Oct  1 12:56 .goutputstream-AD6HLW
-rw-------. 1 humitos humitos  13M Oct  1 12:36 .goutputstream-XTMPLW
-rw-------. 1 humitos humitos    0 Oct  1 12:43 tmpYzMUYe31004o2.zd

comment:3 follow-up: Changed 9 years ago by humitos

This is a bug on GLib:

I'm looking for a workaround in the meantime.

comment:4 Changed 9 years ago by humitos

  • Keywords patch added

A simple way to test this patch: create a file with an old timestamp

touch -mt 1209301830 $HOME/.sugar/default/org.laptop.WebActivity/instance/.goutputstream-test

Changed 9 years ago by humitos

v2 - adds uptime check

Changed 9 years ago by humitos

v3 - with some modification indicated by Martin

comment:5 Changed 9 years ago by humitos

  • Keywords r? added

comment:6 in reply to: ↑ 3 Changed 8 years ago by humitos

Replying to humitos:

This is a bug on GLib:

I added a new comment on this issue because I found that using WebKit.Download and WebKit.NetworkRequest no .goutputstream files are left.

https://bugzilla.gnome.org/show_bug.cgi?id=629301#c4

comment:7 Changed 8 years ago by manuq

  • Keywords r+ olpc-test-pending added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

Finally pushed 32764d06 . Thanks!

comment:8 Changed 8 years ago by greenfeld

  • Keywords olpc-test-passed added; olpc-test-pending removed

The temporary download file is removed in Browse-148/OLPC 13.1.0 os20.

As the patch notes this purge is done when Browse starts up a day later or after a system restart.

Of note is while the temporary file is removed, the download progress Journal entry is not if the user had not previously manually tried to erase it. It still can be manually erased though.

comment:9 Changed 8 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.