mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-29 20:49:36 +08:00
Fix mkstemps()
argument
This commit is contained in:
parent
bfb6022beb
commit
53225997d2
@ -9,7 +9,7 @@
|
|||||||
* | Yangmoooo <yangmoooo@outlook.com>
|
* | Yangmoooo <yangmoooo@outlook.com>
|
||||||
* |
|
* |
|
||||||
* Created On : <2023-08-29>
|
* Created On : <2023-08-29>
|
||||||
* Last Modified : <2025-07-22>
|
* Last Modified : <2025-07-28>
|
||||||
*
|
*
|
||||||
* chsrc framework
|
* chsrc framework
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
@ -1347,7 +1347,7 @@ chsrc_make_tmpfile (char *filename, char *postfix, bool loud, char **tmpfilename
|
|||||||
char *tmpfile = xy_strjoin (3, "chsrc_tmp_", filename, postfix);
|
char *tmpfile = xy_strjoin (3, "chsrc_tmp_", filename, postfix);
|
||||||
FILE *f = fopen (tmpfile, "w+");
|
FILE *f = fopen (tmpfile, "w+");
|
||||||
#else
|
#else
|
||||||
char *tmpfile = xy_strjoin (4, "/tmp/", "chsrc_tmp_", filename, "_XXXXXX", postfix);
|
char *tmpfile = xy_strjoin (5, "/tmp/", "chsrc_tmp_", filename, "_XXXXXX", postfix);
|
||||||
size_t postfix_len = strlen (postfix);
|
size_t postfix_len = strlen (postfix);
|
||||||
|
|
||||||
/* 和 _mktemp_s() 参数不同,前者是整个缓存区大小,这里的长度是后缀长度 */
|
/* 和 _mktemp_s() 参数不同,前者是整个缓存区大小,这里的长度是后缀长度 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user