Revision: 42422
http://brlcad.svn.sourceforge.net/brlcad/?rev=42422&view=rev
Author: starseeker
Date: 2011-01-18 22:15:39 +0000 (Tue, 18 Jan 2011)
Log Message:
-----------
Interesting... when launching bwish from the root install dir (e.g.
./bin/bwish) the return of bu_brlcad_data was not a full path (or even strictly
speaking a relative path unless you add an implicit '.') and archer didn't
start. This is a bit of a corner case, but still should work - try to make it
more robust.
Modified Paths:
--------------
brlcad/branches/cmake/src/libbu/brlcad_path.c
Modified: brlcad/branches/cmake/src/libbu/brlcad_path.c
===================================================================
--- brlcad/branches/cmake/src/libbu/brlcad_path.c 2011-01-18 21:39:54 UTC
(rev 42421)
+++ brlcad/branches/cmake/src/libbu/brlcad_path.c 2011-01-18 22:15:39 UTC
(rev 42422)
@@ -540,6 +540,14 @@
lhs = _brlcad_data();
snprintf(where, MAX_WHERE_SIZE, "\tBRLCAD_DATA compile-time path [%s]\n",
lhs);
if (_bu_find_path(result, lhs, rhs, &searched, where)) {
+ const char *ipwd = _bu_ipwd();
+ char full_path[MAXPATHLEN] = {0};
+ snprintf(full_path, MAXPATHLEN, "%s%c%s", ipwd, BU_DIR_SEPARATOR,
result);
+#ifdef HAVE_REALPATH
+ realpath(full_path, result);
+#else
+ snprintf(result, "%s", full_path);
+#endif
if (UNLIKELY(bu_debug & BU_DEBUG_PATHS)) {
bu_log("Found: BRLCAD_DATA compile-time path [%s]\n", result);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits