elementary / elementary/fileroller

Can't create zip archive on external disk when local disk has not enough space for temporary file

Open
#39 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Meson
Stars
6
Forks
1
Avg merge
6h 15m
Merged PRs (30d)
2

Description

### What Happened?

I tried to create a zip archive on an SMB (Samba) share of a folder with 15 GB data.

![Screenshot from 2023-06-05 16-21-50](https://github.com/elementary/files/assets/91113/e639dad5-17f4-4dbe-9b9d-ad00cd416a4f)

![Screenshot from 2023-06-05 16-11-44](https://github.com/elementary/files/assets/91113/bafad7ad-5c9e-4f2f-b8c1-f2b00ae24cff)

It always fails with this unhelpful error.

![Screenshot from 2023-06-05 16-15-17](https://github.com/elementary/files/assets/91113/71284e25-9f9d-4cc1-b8d6-622a726b6acb)

I watched the free disk space on the local disk and it turns out, the zip archive is temporary created on the local disk and then moved, but the local disk does not have enough space free. It works when compressing a smaller folder.

https://www.youtube.com/watch?v=_gbEWEj7Kvc

Compressing this 15.3 GB folder needs about 25 GB temporary free disk space.

![compress](https://github.com/elementary/fileroller/assets/91113/fa16c652-4c04-41cb-b0a8-23046f972bd0)

The final zip archive on the SMB share is 13.7 GB and it looks like this much **space is not freed** on my local disk after compressing is finished!

### Steps to Reproduce

0. watch free disk space: `watch -d -n 0.5 "df -h | grep /dev/dm-2` (use your device where / is mounted)
1. right click folder in files
2. Click "Compress"
3. Select "Location" on an SMB share (or anywhere not on the / partition)
4. Click "Create" button

### Expected Behavior

features should work and errors should be helpful

always check if the space to create files is free. maybe not only for archives, but for any file save! could you implement that in granite?
investigate if the zip file could directly be created on the final location, so this still works when local disk is full
if you fail to find an elegant solution, at least give the user useful feedback, like "not enough space available on DISKNAME to create temporary archive file"
show in the dialog that the file is moved from temp location to final location. it's currently intransparent what is happening! https://youtu.be/KMllcb92XQ8?t=168

### OS Version

Other Linux

NixOS 22.11.4021.54495a4eafe

### Software Version

Older release (I have not run all updates)

elementary-files-6.2.1

### Log Output

```shell
i did start files from terminal, but got no output
```

### Hardware Info

Lenovo Thinkpad X230
Ethernet connection

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.