create_adm.c (32785) | create_adm.c (34461) |
---|---|
1/* 2 * Copyright (c) 1992, Brian Berliner and Jeff Polk 3 * Copyright (c) 1989-1992, Brian Berliner 4 * 5 * You may distribute under the terms of the GNU General Public License as 6 * specified in the README file that comes with the CVS source distribution. 7 * 8 * Create Administration. --- 45 unchanged lines hidden (view full) --- 54 (void) sprintf (tmp, "%s/%s", dir, CVSADM); 55 else 56 (void) strcpy (tmp, CVSADM); 57 if (isfile (tmp)) 58 error (1, 0, "there is a version in %s already", update_dir); 59 60 if (CVS_MKDIR (tmp, 0777) < 0) 61 { | 1/* 2 * Copyright (c) 1992, Brian Berliner and Jeff Polk 3 * Copyright (c) 1989-1992, Brian Berliner 4 * 5 * You may distribute under the terms of the GNU General Public License as 6 * specified in the README file that comes with the CVS source distribution. 7 * 8 * Create Administration. --- 45 unchanged lines hidden (view full) --- 54 (void) sprintf (tmp, "%s/%s", dir, CVSADM); 55 else 56 (void) strcpy (tmp, CVSADM); 57 if (isfile (tmp)) 58 error (1, 0, "there is a version in %s already", update_dir); 59 60 if (CVS_MKDIR (tmp, 0777) < 0) 61 { |
62 /* We want to print out the entire update_dir, since a lot of 63 our code calls this function with dir == "." or dir == 64 NULL. I hope that gives enough information in cases like 65 absolute pathnames; printing out xgetwd or something would 66 be way too verbose in the common cases. */ 67 |
|
62 if (warn) 63 { 64 /* The reason that this is a warning, rather than silently 65 just skipping creating the directory, is that we don't want 66 CVS's behavior to vary subtly based on factors (like directory 67 permissions) which are not made clear to the user. With 68 the warning at least we let them know what is going on. */ | 68 if (warn) 69 { 70 /* The reason that this is a warning, rather than silently 71 just skipping creating the directory, is that we don't want 72 CVS's behavior to vary subtly based on factors (like directory 73 permissions) which are not made clear to the user. With 74 the warning at least we let them know what is going on. */ |
69 error (0, errno, "warning: cannot make directory %s", tmp); | 75 error (0, errno, "warning: cannot make directory %s in %s", 76 CVSADM, update_dir); 77 free (tmp); |
70 return 1; 71 } 72 else | 78 return 1; 79 } 80 else |
73 error (1, errno, "cannot make directory %s", tmp); | 81 error (1, errno, "cannot make directory %s in %s", 82 CVSADM, update_dir); |
74 } 75 76 /* record the current cvs root for later use */ 77 78 Create_Root (dir, CVSroot_original); 79 if (dir != NULL) 80 (void) sprintf (tmp, "%s/%s", dir, CVSADM_REP); 81 else --- 98 unchanged lines hidden --- | 83 } 84 85 /* record the current cvs root for later use */ 86 87 Create_Root (dir, CVSroot_original); 88 if (dir != NULL) 89 (void) sprintf (tmp, "%s/%s", dir, CVSADM_REP); 90 else --- 98 unchanged lines hidden --- |