Skip to content

Commit

Permalink
Merge pull request #239 from lzaoral/fix-uploads-selinux
Browse files Browse the repository at this point in the history
upload: use `copy` instead of `move`
  • Loading branch information
rohanpm authored Dec 12, 2023
2 parents 308ea96 + 2d7641a commit e37bba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kobo/django/upload/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def file_upload(request):
if not os.path.isdir(upload.target_dir):
os.makedirs(upload.target_dir)

shutil.move(tmp_file_name, upload.target_dir)
shutil.move(tmp_file_name, upload.target_dir, copy_function=shutil.copy)
shutil.rmtree(tmp_dir)

upload.state = UPLOAD_STATES["FINISHED"]
Expand Down

0 comments on commit e37bba6

Please sign in to comment.