Changeset 0ba7333


Ignore:
Timestamp:
Jul 16, 2011, 12:28:10 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
f415f83
Parents:
f5f6ec0
git-author:
David Benjamin <davidben@mit.edu> (07/11/11 02:13:47)
git-committer:
David Benjamin <davidben@mit.edu> (07/16/11 00:28:10)
Message:
Use g_build_filename to compute reference paths

If the home directory has a trailing slash (for instance, on multics,
root's home is actually '/') then our expected path is wrong.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester.c

    r8219374 r0ba7333  
    274274  g_free(s);
    275275
    276   path = g_strconcat(home, "/foo/bar/baz", NULL);
     276  path = g_build_filename(home, "foo/bar/baz", NULL);
    277277  s = owl_util_makepath("~///foo/bar//baz");
    278278  FAIL_UNLESS("makepath ~///foo/bar//baz", !strcmp(path, s));
     
    292292  g_free(s);
    293293
    294   path = g_strconcat(home, "/foo/bar/baz", NULL);
     294  path = g_build_filename(home, "foo/bar/baz", NULL);
    295295  s = owl_util_makepath("~root///foo/bar//baz");
    296296  FAIL_UNLESS("makepath ~root///foo/bar//baz", !strcmp(path, s));
Note: See TracChangeset for help on using the changeset viewer.