Can't delete files with zero size
Closed this issue · 1 comments
SEBROVATER commented
Can't delete files with zero size
To Reproduce
I've tried to upload several files from inside a zip archive just by drag-and-drop. They are uploaded but got zero size.
After that I tried to delete them but without success. Instead, I'm getting such error:
delete failed:
Traceback (most recent call last):
File "PP/copyparty/broker_util.py", line 47, in try_exec
return func(*args)
^^^^^^^^^^^
File "PP/copyparty/up2k.py", line 3107, in handle_rm
a, b, c = self._handle_rm(uname, ip, vp, lim, rm_up)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "PP/copyparty/up2k.py", line 3226, in _handle_rm
self._forget_file(ptop, volpath, cur, wark, True, st.st_size)
File "PP/copyparty/up2k.py", line 3573, in _forget_file
p = self._vis_job_progress(job)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "PP/copyparty/up2k.py", line 542, in _vis_job_progress
perc = 100 - (len(job["need"]) * 100.0 / len(job["hash"]))
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero
URL: autocad/zimnik.dwl
Uploading not from archives works as fine as deleting.
The same problem with uploading dirs
Expected behavior
Just workable deleting is enough
Screenshots
Uploading result
Deleting result
Server details
- debian-bookworm
- service is running in a docker container (im:latest image)
Client details
- Windows 10
- Brave Browser
9001 commented
Lmao, nice
I'll fix that this weekend 👍 thx!