Age | Commit message (Collapse) | Author |
|
|
|
stop us from restricting permissions of just-created absolute-named
directories.
|
|
|
|
(make_dir_parents): Last arg is now int * (for errno), not bool *.
Rewrite "mkdir -p" algorithm to avoid the need for "stat"
each time through the loop. Do not diagnose restore_cwd failure;
that is the caller's job (and perhaps the caller does not care).
|
|
(make_dir_parents): Last arg is now int * (for errno), not bool *.
|
|
|
|
(make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
If the file already exists but is not a directory, don't bother
to try to make its parents.
Close potential file descriptor leak if we can't chdir("/") (!).
Don't always return true if chdir($PWD) fails; return true only
if the requested action was done successfully (except for the
chdir($PWD)).
Don't log final directory unless we actually made it.
Refactor to avoid duplicate code to fix up permissions.
Don't attempt to fix up parent permissions if chdir($PWD) fails.
|
|
|
|
|
|
(openat_restore_fail): Rename from openat_restore_die.
|
|
|
|
|
|
to restore initial working directory.
|
|
|
|
|
|
|
|
|
|
restore_cwd failure. Now, an application can arrange e.g.,
to perform a longjump in that case.
* openat.c: Include dirname.h.
Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
(rpl_openat, fdopendir, fstatat): Call openat_save_die
and openat_restore_die rather than calling error directly.
Don't include "error.h" or "exitfail.h"; they're no longer needed.
* openat-die.c (openat_save_die, openat_restore_die): New file.
* openat.h (openat_save_die, openat_restore_die): Declare and define.
|
|
|
|
|
|
to tell caller if/when we change the working directory and are
unable to return to the initial one.
|
|
|
|
This fixes a bug introduced on 2004-07-30.
|
|
|
|
or "path", as per the GNU coding standards. As part of this,
rename makepath.c to mkdir-p.c, and path-concat.c to filenamecat.c,
and likewise for the .h files.
|
|
in comments or local variable names.
|
|
All uses changed.
|
|
in comments or local variable names.
(excluded_file_name): Renamed from excluded_filename.
All uses changed.
|
|
(file_name_concat): Renamed from path_concat. All callers changed.
[TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
|
|
(file_name_concat): Renamed from path_concat. All callers changed.
|
|
(make_dir_parents): Renamed from make_path. All callers changed.
|
|
(make_dir_parents): Renamed from make_path. All callers changed.
|
|
|
|
|
|
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
|
|
files have been getting away with it for years (MORE/BSD 4.3
is extinct now).
|
|
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
|
|
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
|
|
Define to 256, not 255, as per modern POSIX.
|
|
|
|
the configuration hassle isn't worth it.
Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
(LONGEST_MODIFIER, PRIuMAX): Remove.
|
|
|
|
so that unistd-safer.h (GPL'ed code) need not be included.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(setup_dir, free_dir): New functions.
(enter_dir, leave_dir): Define trivial
alternatives of _LGPL_PACKAGE. Move to fts-cycle.c if !_LGPL_PACKAGE.
(HT_INITIAL_SIZE, ENTER_DIR): Remove. All uses removed.
(LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
(struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
Move to fts-cycle.c.
(fts_open): Use setup_dir.
(fts_close): Use free_dir.
(fts_read): Have just one copy of the ENTER_DIR code rather than three.
This adds a label and some gotos, but the alternatives were messier.
Check for memory allocation failure when entering a dir.
(fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
|