diff options
| author | 2012-09-18 19:35:54 +0200 | |
|---|---|---|
| committer | 2012-09-18 19:35:54 +0200 | |
| commit | 963c85b479607464b2834655c196ec520fcca30d (patch) | |
| tree | 6a34b4b6b0d6a12acb0f048cdd7cdc64b544cade /src | |
| parent | d47e68fe21a22d631e95db5c53b6647dc0139f86 (diff) | |
| download | gitto-963c85b479607464b2834655c196ec520fcca30d.tar.gz gitto-963c85b479607464b2834655c196ec520fcca30d.zip | |
Return #f when no path is found
Return `SCM_BOOL_F' when `realpath' can't find the path.
Diffstat (limited to 'src')
| -rw-r--r-- | src/gitto-path.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gitto-path.c b/src/gitto-path.c index 4fdd6ab..7ed5f51 100644 --- a/src/gitto-path.c +++ b/src/gitto-path.c @@ -26,7 +26,10 @@ SCM_DEFINE(realpath_wrapper, "realpath", 1, 0, 0, { char *relative_path = scm_to_locale_string(path); char *resolved_path = realpath(relative_path, NULL); - SCM scm_resolved_path = scm_from_locale_string(resolved_path); + SCM scm_resolved_path = SCM_BOOL_F; + + if (resolved_path) + scm_resolved_path = scm_from_locale_string(resolved_path); free(relative_path); free(resolved_path); |
