Get umask at start (done at start to limit the non-atomic nature of the poorly defined POSIX umask()).
Begin setting up for directory copy operations.
f_file_create() no longer accepts de-reference parameter.
f_string_lengths remaining;
bool process_pipe;
+ mode_t umask;
uint8_t operation;
uint8_t verbosity;
f_string_lengths_initialize, \
F_false, \
0, \
+ 0, \
fake_verbosity_normal, \
f_string_dynamic_initialize, \
f_string_dynamics_initialize, \
const f_console_arguments arguments = { argc, argv };
fake_data data = fake_data_initialize;
+ // @fixme: bad design in POSIX where there is no get umask without setting it.
+ data.umask = umask(0);
+
+ // restore umask.
+ umask(data.umask);
+
f_status status = fake_main(arguments, &data);
if (F_status_is_error(status)) {
return status;
}
+ f_directory_statuss failures = f_directory_statuss_initialize;
+ f_directory_mode mode = f_directory_mode_initialize;
+
+ f_macro_directory_mode_set_default_umask(mode, data.umask);
+
// @todo: may have to process all data intended to be used in parameters, exploding them into console parameters.
// Steps:
// 1) copy sources settings to build settings
mode = f_file_mode_all_rwx;
}
- status = f_file_create(path.string, mode, F_true, F_true);
+ status = f_file_create(path.string, mode, F_true);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {