One small change to make the code clearer in update.
This commit is contained in:
parent
683ac3d341
commit
697d2a5b20
@ -435,15 +435,15 @@ update_filesdone_proc (err, repository, update_dir)
|
||||
char from[PATH_MAX], to[PATH_MAX];
|
||||
|
||||
/* Read all the link pairs from the symlinks file */
|
||||
while (fgets(from, PATH_MAX, links)) {
|
||||
fgets(to, PATH_MAX, links);
|
||||
while (fgets(to, PATH_MAX, links)) {
|
||||
fgets(from, PATH_MAX, links);
|
||||
|
||||
/* Strip off the newlines */
|
||||
to[strlen(to) - 1] = '\0';
|
||||
from[strlen(from) - 1] = '\0';
|
||||
|
||||
/* Do it */
|
||||
if (symlink(to, from) == -1) {
|
||||
if (symlink(from, to) == -1) {
|
||||
error (0, errno, "Unable to create symlink `%s'", to);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user