[darwinbuild-changes] [648] branches/PR-7250612/darwinup/File.cpp

source_changes at macosforge.org source_changes at macosforge.org
Wed Dec 9 15:15:49 PST 2009


Revision: 648
          http://trac.macosforge.org/projects/darwinbuild/changeset/648
Author:   wsiegrist at apple.com
Date:     2009-12-09 15:15:49 -0800 (Wed, 09 Dec 2009)
Log Message:
-----------
Use the correct path when setting info on symlinks

Modified Paths:
--------------
    branches/PR-7250612/darwinup/File.cpp

Modified: branches/PR-7250612/darwinup/File.cpp
===================================================================
--- branches/PR-7250612/darwinup/File.cpp	2009-12-08 21:34:10 UTC (rev 647)
+++ branches/PR-7250612/darwinup/File.cpp	2009-12-09 23:15:49 UTC (rev 648)
@@ -296,14 +296,17 @@
 
 int Symlink::install_info(const char* dest) {
 	int res = 0;
-	const char* path = this->path();
+	char* path;
+	join_path(&path, dest, this->path());
 	//mode_t mode = this->mode() & ALLPERMS;
 	uid_t uid = this->uid();
 	gid_t gid = this->gid();
 	IF_DEBUG("[install] lchown(%d, %d)\n", uid, gid);
 	if (res == 0) res = lchown(path, uid, gid);
+	if (res == -1) fprintf(stderr, "%s:%d: %s: %s (%d)\n", __FILE__, __LINE__, path, strerror(errno), errno);
 	//IF_DEBUG("[install] lchmod(%o)\n", mode);
 	//if (res == 0) res = lchmod(path, mode);
+	free(path);
 	return res;
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20091209/80952cfa/attachment.html>


More information about the darwinbuild-changes mailing list