summaryrefslogtreecommitdiff
path: root/libbb/make_directory.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make certain clients of bb_make_directory default to honoringEric Andersen2004-10-131-1/+8
| | | | the user's umask
* Patch from Michael Tokarev:Eric Andersen2004-10-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scenario: touch x -- creates plain file name `x' mkdir x -- exits successefully libbb/make_directory.c, bb_make_directory(), contains the following code: if (mkdir(path, 0777) < 0) { /* If we failed for any other reason than the directory * already exists, output a diagnostic and return -1.*/ if (errno != EEXIST) { fail_msg = "create"; umask(mask); break; } /* Since the directory exists, don't attempt to change * permissions if it was the full target. Note that * this is not an error conditon. */ if (!c) { umask(mask); return 0; } } The assumption that EEXIST error is due to that the *directory* already exists is wrong: any file type with that name will cause this error to be returned. Proper way IMHO will be is to stat() the path and check whenever this is really a directory. Below (attached) is a patch to fix this issue.
* Larry Doolittle writes:Eric Andersen2004-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
* Major coreutils update.Manuel Novoa III2003-03-191-46/+72
|
* Dont need a seperate functionGlenn L McGrath2002-11-241-19/+13
|
* When making parent directories set permissions based on the base parent tree ↵Glenn L McGrath2002-11-241-8/+26
| | | | rather than the new directory to be created.
* Dont try and make the "/" directoryGlenn L McGrath2002-10-191-2/+2
|
* Fail straight away rather than recursively printing error messages :)Glenn L McGrath2002-09-281-1/+1
|
* Fix error messages conditions, and make them the same as GNU mkdir.Glenn L McGrath2002-09-221-2/+2
|
* Dont return an error if the directory already existedGlenn L McGrath2002-08-241-3/+7
|
* Fix warningGlenn L McGrath2002-08-241-0/+1
|
* Rewrite, its smallerGlenn L McGrath2002-08-231-30/+22
|
* Canonicalize dirname(3) behavior.Matt Kraai2001-08-241-3/+7
|
* Fix a memory leak if parent directory creation failed.Matt Kraai2001-08-241-4/+4
|
* make_directory used mode as if it were an signed entity, but in factEric Andersen2001-08-021-1/+1
| | | | | it was a mode_t which is unsigned. Fix it to be signed... -Erik
* stdlib.h defined free(), which this needsEric Andersen2001-06-221-0/+1
|
* Rewrote mkdir (and touched lots of things in the process).Matt Kraai2001-06-211-0/+66