UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Open Bug report #2830 uforadiant app_path always set to current_dir
Go to the next issue (open or closed)
Go to the next open issue
mattn (@tlh2000) has been working on this issue since January 28, 2013 (20:47)
Issue basics
  • Type of issue
    Bug report
  • Category
    Map Editor (UFORadiant)
  • Targetted for
    Not determined
  • Status
    Open
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/2830 Item 2830] imported from sourceforge.net tracker on 2013-01-28 19:50:51

1) ufoai-2.3.1-source.tar.bz2

2) Fedora 14

3) run uforadiant from a directory different than the one that contains its files

looking at the problem in gdb:

Breakpoint 1, environment_init () at src/tools/radiant/radiant/environment.cpp:56
56 StringOutputStream path(256);
(gdb) until
60 path << DirectoryCleaned(g_get_home_dir()) << RADIANT_HOME << RADIANT_DIRECTORY;
(gdb) until
62 g_mkdir_with_parents(path.c_str(), 0775);
(gdb) until
63 home_path = path.c_str();
(gdb) until
65 path.clear();
(gdb) until
67 const char *appPath = PKGDATADIR"/"RADIANT_DIRECTORY;
(gdb) until
68 if (g_file_test(appPath, (GFileTest)G_FILE_TEST_IS_DIR) && g_path_is_absolute(path.c_str())) {
(gdb) print path.c_str()
$6 = 0x31e9a00 ""
(gdb) print appPath
$7 = 0x968501 "/usr/share/ufoai/radiant/"


/usr/share/ufoai/radiant/ is a dir, but the second part g_path_is_absolute(path.c_str()) is always false when there is path.clear(); just above the test

the following patch seems to fix the issue for me:

--- src/tools/radiant/radiant/environment.cpp~ 2010-11-29 17:46:35.000000000 +0100
+++ src/tools/radiant/radiant/environment.cpp 2011-03-17 14:25:06.819424023 +0100
@@ -65,7 +65,7 @@
path.clear();
#ifdef PKGDATADIR
const char *appPath = PKGDATADIR"/"RADIANT_DIRECTORY;
- if (g_file_test(appPath, (GFileTest)G_FILE_TEST_IS_DIR) && g_path_is_absolute(path.c_str())) {
+ if (g_file_test(appPath, (GFileTest)G_FILE_TEST_IS_DIR)) {
app_path = PKGDATADIR"/"RADIANT_DIRECTORY;
} else
#endif
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif