This forum has been archived. All content is frozen. Please use KDE Discuss instead.

give a warning when some file movement will fail

15

Votes
16
1
Tags: None
(comma "," separated)
job
Registered Member
Posts
18
Karma
0
It would be nice if KDE would give a warning when an attempt to copy/move some file(s) will certainly fail. The following situations come to mind:

- The destination does not have enough space left to store the file(s).
- The source is a file > 4GB and the destination is a FAT-partition.

Probably there are more...

I think it is really annoying those warnings are not given atm.
job
Registered Member
Posts
18
Karma
0
Nobody else who thinks this is a problem?
fleppestijn
Registered Member
Posts
6
Karma
0
This is _VERY_ tricky to get exactly right. The target fs could sit in a sparse file on another fs with very little space left. The target fs could be on a remote file server where anything can happen. The target fs could grow and shrink on demand, and report a varying space left instead of some sort of "theoretical" free space it can manage. Or it could be as simple as a torrent client that suddenly connects to friendly peers while you try moving files to the same fs the client is writing to. Or maybe someone else is logged in at the same time and also tries to copy/move a large file to the target fs. I consider that a very realistic scenario.
Of course much of that wouldn't be such a problem, but along comes aunt Tillie who tries to move her home videos to an external drive and it's almost full. So she gets a warning. She accepts that the drive is almost full, wipes an old duplicate and carries on. Everything is well. The next day she has more home videos and this time she wants to show them to the family. Thus, she moves them to the DVR nephew Pepe happens to be recording something on.
I can see the bug reports coming in:
* No warning when copying files to the network
* Disk space warning in file copier broken
* Dolphin doesn't warn on low disk space for ACME DVR 2000™
* KDE assumes only one user per filesystem
Etc, etc... Seems like this idea would create more problems then it solves. If you can be very specific about how to implement this in a way that wouldn't be misleading in any way to users, please do so.
job
Registered Member
Posts
18
Karma
0
@fleppestijn: Those are indeed situations that will be very hard to handle.

What I meant with this idea is giving a warning when the movement will fail FOR SURE. Like the situations I gave in my first post.

There will always be some situation that cannot be predicted, but I think it will be a HUGE improvement if there are warnings for some common situations (it feels really stupid when you are copying something to a USB drive and it takes the drive to get full before you get an error. Of course there is the situation where multiple users are copying to this drive but I don't think this is really common for the average user and this situation will be handled by the error that exists atm).
Copying a file > 4GB to a FAT partition is also something that will always fail so there should be warning.

I didn't look at any code myself, but I can't imagine it will be that difficult to check for such common situations. Am I right? Please correct me if not:-)
fleppestijn
Registered Member
Posts
6
Karma
0
job wrote:What I meant with this idea is giving a warning when the movement will fail FOR SURE. Like the situations I gave in my first post.
About the only situations where a move/copy operation is destined to fail is the FAT12/16/32 situation you mentioned and a read-only fs. When copying to a ro fs, you'll get an error. With your idea, the user would get an error *and* a prior warning. That seems a little bit obnoxious to me. So that leaves us with 1 scenario. To be more specific: when copying to a FAT filesystem /locally/ (as it's impossible to determine the actual filesystem over the network) AND the source filesize is known. This outlines in general terms what would need to be done besides:

1. Maintaining a list of filesystems that are limited and what the supported OSes call them (so far, just 3, thats ok)
2. Verifying that the target fs is one on the list across all supported OSes (which may at least partially already been implemented), on every move/copy operation in the KIOSlave for local filesystems
3. Explaining to the user in non-technical terms that the operation is a bad move because of a technicality
4. (Optional) provide a more helpful explanation in the documentation.

This is a very specific corner-case so I'd consider this a form of bloat. Of course that argument may be moot, but I digress.
job
Registered Member
Posts
18
Karma
0
fleppestijn wrote:About the only situations where a move/copy operation is destined to fail is the FAT12/16/32 situation you mentioned and a read-only fs. When copying to a ro fs, you'll get an error. With your idea, the user would get an error *and* a prior warning.


With a ro fs, the error would be sufficient.
Why do you think it would be the problem to determine the destinations free space and give a warning when it's not sufficient?

I really think you are talking about a lot of "corner cases" which might be a problem. But for most users, it would be really great just to know that the USB drive they are copying to hasn't got enough space and get a warning about it. I also think this cannot be a big thing to implement. For all cases where we cannot be sure, the system will stay as is.

Last edited by job on Thu Mar 26, 2009 1:39 pm, edited 1 time in total.
fleppestijn
Registered Member
Posts
6
Karma
0
job wrote:But for most users, it would be really great just to know that the USB drive they are copying to hasn't got enough space and get a warning about it.
I've swapped files across filesystems in parallel where a sequential operation wouldn't work because available storage space was lacking (although not with KDE).
job wrote:For all cases where we cannot be sure, the system will stay as is.
So far then, that's 1 scenario. I bet at least 99% of copy or move operations performed don't fall into that scenario, thus this is a corner-case in my book. I don't want to argue against someone implementing such behaviour, I'm merely pointing out that this probably isn't as big a deal as you proclaim it is unless you actually want magical warnings from the future.


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]