! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
check available space on drive before/during write to Disc
Status:
RESOLVED: FIXED

Comments

Description Roman Ivanov 2009-08-07 16:05:36 CEST
Xubuntu 9.04, Xfce 4 Desktop Environment version 4.6.1 (Xfce 4.6)

1. Insert Flash drive. with (for example) 2 Gb free space.
2. Copy file to removable(Flash) drive with size (for example) 4.2 Gb - iso image of ALT Linux.

Detected: file is copied for few minutes, and at the end show error that operation could not be finished due to lack of free space. Only "Cancel" button is available.

Expected: 
1. Warn user before copying about lack of free space.
2. If it is difficult or too long to calculate free space -  pause operation, show me a error dialog and allow to clear space manually and continue or cancel operation.
Comment 1 Jannis Pohlmann editbugs 2009-08-07 16:26:41 CEST
> Expected: 
> 1. Warn user before copying about lack of free space.

I agree that a warning would be nice. 

> 2. If it is difficult or too long to calculate free space -  pause operation,
> show me a error dialog and allow to clear space manually and continue or cancel
> operation.

This unfortunately won't work. At least for Thunar <= 1.0.x this isn't feasible because development efforts are now focused on Thunar 1.2.x which will be using GIO instead of ThunarVFS.

Move/copy implementations with GIO don't support pause/resume, at least not when copying a single file. Inbetween files we could do it, but that would mean to introduce inconsistent behavior.

In theory, we could reuse the warning dialog you proposed for this. The basic idea when copying/moving one or more files:

  1. Advance to the next file in the list
  2. Check available disk space against file size
    a. space < file size: display a warning dialog with "Try again" and 
       "Cancel" buttons
    b. space >= file size: copy/move the file
  3. Continue with 1.

The problem here is that even while copying/moving a single file, there's nothing to prevent other programs from filling up the disk. So in the end, the operation can always fail. 
The warning dialog suggests that if you click "Try again" and Thunar continues with the operation, everything will be fine. This is not guaranteed though and will lead to confusion. (Although I'm not saying that the amount of confusion caused by the current behavior can be considered less ...)

So, I'm not yet convinced that this is good idea. I'm also not sure how much overhead computing the free space before each file copy/move operation generates.
Comment 2 Nick Schermer editbugs 2012-09-26 12:40:36 CEST
*** Bug 8352 has been marked as a duplicate of this bug. ***
Comment 3 Nick Schermer editbugs 2012-09-30 21:36:32 CEST
Fixed in ecad362.

Bug #5658

Reported by:
Roman Ivanov
Reported on: 2009-08-07
Last modified on: 2012-09-30
Duplicates (1):
  • 8352 Feature request: count space in destination

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Attachments

Additional information