summaryrefslogtreecommitdiff
path: root/src/fileops.c
AgeCommit message (Collapse)Author
2024-03-16chmod after truncate and setutimes on the remote side.Ryo Nakamura
When the source file permission is r--r--r--, truncate and setutimes AFTER chmod fail due to permission deined. So, do chmod after truncate and setutimes.
2024-02-06add .clang-format from Linux kernel and format sourcesRyo Nakamura
The exception is that ColumnLimit is 90.
2024-02-06refactor error message-related functionsRyo Nakamura
split message print fuctions (mpr_*), strerrno, and mscp_get/set_error into print.c/h and strerrno.c/h. ToDo: revise usages of priv_set_errv and pr_* functions.
2024-02-06add -p option, preserving file timestampsRyo Nakamura
2024-02-04do not passing msg_fp via mscp optsRyo Nakamura
instead, mpr_* functions print messages to stdout or stderr directly.
2024-01-21make it buildable at FreeBSDRyo Nakamura
2024-01-18add SPDX-License-Identifier to source filesRyo Nakamura
2023-09-08fix: use off_t for lseekRyo Nakamura
2023-08-30fix mscp_opendir, do not use `tls_sftp`, use `sftp` isntead.Ryo Nakamura
The fixed issue causes mscp_opendir wrongly calls opendir() for local when tls_sftp is NULL although sftp is not NULL.
2023-08-04do not set O_TRUNC when opening destination file.Ryo Nakamura
It prevents `mscp localhost:hoge ~/hoge` from truncating the source file. See https://bugzilla.mindrot.org/show_bug.cgi?id=3431. https://github.com/upa/mscp/issues/1
2023-08-03use pseudo glob/globfree for remote-glob when muslRyo Nakamura
musllibc does not implement GLOB_ALTDIRFUNC, so do not call glob for remote sides when libc is musl. test_e2e.py skips test_glob_src_path when running on alpine.
2023-08-03add glob for source pathsRyo Nakamura
https://github.com/upa/mscp/issues/3
2023-08-03cleanup wrappers for file operationsRyo Nakamura
Previously wrapper functions for open(), opendir(), and stat(), etc, are implemneted in path.h, and now they are in fileops.h and fileops.c. This commit is a reparation for remote glob.