mirror of https://codeberg.org/cage/tinmop/
- [kami] made an effort to replicate the permissions when downloading a file.
This commit is contained in:
parent
560e01e09e
commit
fbd59ea015
|
@ -319,6 +319,9 @@
|
|||
(values raw
|
||||
(logand raw #o777))))
|
||||
|
||||
(defun change-path-permissions (path mode)
|
||||
(nix:chmod path mode))
|
||||
|
||||
(defun file-hash (file)
|
||||
(num:fnv-hash-32 (slurp-file file :convert-to-string nil)))
|
||||
|
||||
|
|
|
@ -111,7 +111,11 @@
|
|||
path
|
||||
(lambda (data offset count)
|
||||
(declare (ignore offset count))
|
||||
(write-sequence data output-stream))))))
|
||||
(write-sequence data output-stream)))))
|
||||
(let* ((info-source-node (9p:path-info *stream* *root-fid* path))
|
||||
(permissions (9p:permissions-original-value (9p:stat-mode info-source-node)))
|
||||
(destination-file-mode (logand permissions #x7ff)))
|
||||
(fs:change-path-permissions destination-file destination-file-mode)))
|
||||
destination-file))
|
||||
|
||||
(defun upload-node (stream root-fid)
|
||||
|
|
|
@ -307,6 +307,7 @@
|
|||
:get-stat-ctime
|
||||
:get-stat-atime
|
||||
:get-stat-mode
|
||||
:change-path-permissions
|
||||
:file-outdated-p
|
||||
:file-exists-p
|
||||
:directory-exists-p
|
||||
|
|
Loading…
Reference in New Issue