I was getting an error when trying to upload my latest map to springfiles
Traceback (most recent call last):
File "/home/springfiles/upq/www/upload/index.py", line 99, in <module>
msgs = SaveUploadedFile(form)
File "/home/springfiles/upq/www/upload/index.py", line 68, in SaveUploadedFile
total, used, free = shutil.disk_usage(tmpdir)
File "/usr/lib/python3.7/shutil.py", line 1016, in disk_usage
st = os.statvfs(path)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/springfiles-upload'
This change fixes that issue.
I've modified the file on the server as well.
Another thing we noticed but I didn't change is that the check a few lines below doesn't make much sense:
cfg = upqconfig.UpqConfig()
for path in [cfg.paths["files"], tmpdir]:
total, used, free = shutil.disk_usage(tmpdir)
if free < 5 * 1024 * 1024 * 1024:
return "To few disk space availabile: %d MiB in %s" %(free / (1024 * 1024), path)
it does a "for path in ..." but then always calls the shutil.disk_usage(tmpdir) instead of shutil.disk_usage(path)
I was getting an error when trying to upload my latest map to springfiles
This change fixes that issue.
I've modified the file on the server as well.
Another thing we noticed but I didn't change is that the check a few lines below doesn't make much sense:
it does a "for path in ..." but then always calls the shutil.disk_usage(tmpdir) instead of shutil.disk_usage(path)
also bad english on that return string :)