Bug 298976 - When trying to overwrite a large file on a small disk, Dolphin says "no space left on device" instead of proceeding anyway
Summary: When trying to overwrite a large file on a small disk, Dolphin says "no space...
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2012-04-28 12:38 UTC by Ivan Pessotto
Modified: 2018-04-29 19:57 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Pessotto 2012-04-28 12:38:37 UTC
If you copy a big file inside a storage device which already exist, dolphin says "no space left on device" instead of ask to overwrite it.

Reproducible: Always

Steps to Reproduce:
1. Take a USB mass storage device (like 1GB USB key).
2. Copy a big file in it (ex. 900MB).
3. Copy another time the same file (or another big file with the same name).
Actual Results:  
Return "disk full".

Expected Results:  
Ask to overwrite the file.

I think dolphin check if there is enough space BEFORE checking if the file can be replaced.
Comment 1 David Faure 2012-05-10 08:51:29 UTC
I think this is because the new file is being written out as "bigfile.part" during the copy, and renamed to "bigfile" at the end of the copy? This is actually a feature, to avoid losing the file completely in case of a write error. But indeed it creates an issue in the case where the destination filesystem isn't big enough for both files. I don't see a good solution to the issue... we can detect this case, but then what? If we overwrite the file upfront, we lose everything (on the destination) if something happens (power cut, forced unplugging, kernel oops, etc.)
Comment 2 Stephan Kulow 2012-05-10 09:34:23 UTC
This is clearly not a bug as David says. The only thing you could ask for IMO is that dolphin on top of kio detects the combination of "disk full" and "file copied to existant file" and offers the user a remove before copy. Of course dolphin could also offer to do always erases - but for kio as library there is no fix IMO.

BTW: the same error you will get with many tools, e.g. rsync also does syncs in parallel and then renames.
Comment 3 Ivan Pessotto 2012-05-10 11:40:21 UTC
Ok I understand your reasons, now I tell you mine :)

I'm the user of my PC, so I know what I'm doing when I'm copying a file. If the destination file already exist, the first thing dolphin must do will be ask to overwrite or not, and not show an invalid error (IMHO) saying "there's no space left" when the file will fit to the destination FS.

Then I have 2 choices:
1) If my choose is to "rename" the destination file, then it's right to give me that error message.
2) If my choice is to "overwrite", then I known I will loose the old existing file. So if in case of power failure/unplugging the old file is missing, who cares? I've already choose that file is useless for me.

After a power failure/unplugging I know the copy operation was aborted and the destination file is inconsistant, but the source file is intact. So the first thing I will do is reboot/replug and then restart the copy operation. So simple :)
This is my honest opinion, and I think this is how works "explorer" on windows.

IMHO I don't think working with dolphin can be comparable to tools like rsync. Dolphin is a file manager, rsync is a file synchronizer and they are used for different works. Dolphin must be like the 'cp' command.

-----

I don't know if this is a dolphin or kio related issue (or feature if you like), but I encountered this "bug" using dolphin, if I was wrong, then I'm sorry.

Thank's anyway and sorry for my english (I'm not good at it).
Comment 4 Stephan Kulow 2012-05-10 11:57:57 UTC
So I think we're in agreement that dolphin should remove the file prior to the copy action to avoid this situation. I wasn't aware it prompts the user about the situation.
Comment 5 Ivan Pessotto 2012-05-10 12:06:35 UTC
I think yes, obviously after the user expressed his willingness to overrwrite the destination file.