Repository: lucy
Updated Branches:
  refs/heads/solaris_fixes [created] c2ef2c924


Fix getcwd on Solaris

Solaris doesn't support getcwd with a size argument of 0.

TODO: Alloc more memory if getcwd fails.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/1b1ca75d
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/1b1ca75d
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/1b1ca75d

Branch: refs/heads/solaris_fixes
Commit: 1b1ca75df82e9c7b474ba67da2c83b74c758c462
Parents: 049ae73
Author: Nick Wellnhofer <[email protected]>
Authored: Tue Aug 19 16:14:48 2014 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Tue Aug 19 19:13:41 2014 +0200

----------------------------------------------------------------------
 core/Lucy/Store/FSFolder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/1b1ca75d/core/Lucy/Store/FSFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFolder.c b/core/Lucy/Store/FSFolder.c
index 9d4d03f..7892a20 100644
--- a/core/Lucy/Store/FSFolder.c
+++ b/core/Lucy/Store/FSFolder.c
@@ -404,7 +404,7 @@ static String*
 S_absolutify(String *path) {
     if (S_is_absolute(path)) { return Str_Clone(path); }
 
-    char *cwd = getcwd(NULL, 0);
+    char *cwd = getcwd(NULL, 2048);
     if (!cwd) { THROW(ERR, "getcwd failed"); }
     String *abs_path = Str_newf("%s" CHY_DIR_SEP "%o", cwd, path);
     free(cwd);

Reply via email to