Changeset 65267f6 in mainline for uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
- Timestamp:
- 2008-08-23T08:35:06Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c9f5e24f
- Parents:
- eb9618c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
reb9618c r65267f6 148 148 149 149 while (dirs[i] != NULL) { 150 /* Rewind to start of relative path */ 151 while (!strcmp(dirs[i], "..")) { 150 /* Sometimes make or scripts conjoin odd paths. Account for something 151 * like this: ../../foo/bar/../foo/foofoo/./bar */ 152 if (!strcmp(dirs[i], "..") || !strcmp(dirs[i], ".")) { 152 153 if (0 != (chdir(dirs[i]))) { 153 154 cli_error(CL_EFAIL, "%s: impossible path: %s", … … 156 157 goto finit; 157 158 } 158 i++;159 }160 getcwd(wdp, PATH_MAX);161 /* Sometimes make or scripts conjoin odd paths. Account for something162 * like this: ../../foo/bar/../foo/foofoo/./bar */163 if (!strcmp(dirs[i], "..") || !strcmp(dirs[i], ".")) {164 chdir(dirs[i]);165 159 getcwd(wdp, PATH_MAX); 166 160 } else {
Note:
See TracChangeset
for help on using the changeset viewer.