News for hackers. Stuff that matters.
Re:Leaky Abstractions by toast0 on Wednesday June 02, 2021 @05:22PM (#27374187)
copy + delete one at a time makes a lot of sense if you're working on a filesystem without a way to move without copying (I don't think you can actually move a file in fat32), because copy all could require more space than is available.

The same could be true here where you're moving from a zip file to probably the same filesystem the zip files is in; if removing a file from the zip file is actually an in-place move data then truncate. The problem, of course, is that removing a file from the zip file is tremendously expensive. Reading the file with one syscall per byte doesn't help (especially post-Spectre workarounds that make syscalls more expensive).

Re:Leaky Abstractions by codetrotter on Wednesday June 02, 2021 @05:40PM (#27374343)
This is the real answer IMO. For example, if you have a 2TB drive with 50GB available space left and are trying to move 1TB of data, and the move is requiring copying, but all individual files on their own are less than 50GB in size, then I’d be pretty upset if my computer was unable to move the files just because it was wanting to not delete anything until the end.

But ideally I’d want the system to delete at the end if possible, and to otherwise delete as needed, instead of either doing only all at end or only after every single file.

Re:Leaky Abstractions by m4lvin on Thursday June 03, 2021 @07:05AM (#27379457)
> copy + delete [...] I don't think you can actually move a file in fat32

Wait, does that mean that a file which is larger than half of the partition in fat32 cannot be moved? Or not even be renamed?

Re:Leaky Abstractions by toast0 on Thursday June 03, 2021 @12:00PM (#27383325)
Fat32 supports rename in the same directory as a simple operation. Moving a file though, I don't think so (and nobody corrected me, so I might be right).
Re:Leaky Abstractions by toast0 on Thursday June 03, 2021 @04:57PM (#27387202)
Ok, well I just tried this on a full fat32 partition, I'm able to move a large file no problems reported, so I was wrong.