{"thread":{"id":"12207","subject":"[PATCH] prefix_path: use is_absolute_path() instead of *orig == '/'","startedAt":"2008-02-19T21:29:40Z","lastAt":"2008-02-19T21:29:40Z","messageCount":1,"participants":["Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"69312","messageId":"1203456580.47bb4a44b9d24@webmail.nextra.at","threadId":"12207","inReplyTo":null,"subject":"[PATCH] prefix_path: use is_absolute_path() instead of *orig == '/'","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2008-02-19T21:29:40Z","receivedAt":"2008-02-19T21:29:40Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n\nThis goes on top of branch jc/setup.\n\n-- Hannes\n\n setup.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/setup.c b/setup.c\nindex 5e4cecb..18ddfae 100644\n--- a/setup.c\n+++ b/setup.c\n@@ -91,7 +91,7 @@ const char *prefix_path(const char *prefix, int len,\n {\n \tconst char *orig = path;\n \tchar *sanitized = xmalloc(len + strlen(path) + 1);\n-\tif (*orig == '/')\n+\tif (is_absolute_path(orig))\n \t\tstrcpy(sanitized, path);\n \telse {\n \t\tif (len)\n@@ -100,7 +100,7 @@ const char *prefix_path(const char *prefix, int len,\n \t}\n \tif (sanitary_path_copy(sanitized, sanitized))\n \t\tgoto error_out;\n-\tif (*orig == '/') {\n+\tif (is_absolute_path(orig)) {\n \t\tconst char *work_tree = get_git_work_tree();\n \t\tsize_t len = strlen(work_tree);\n \t\tsize_t total = strlen(sanitized) + 1;\n-- \n1.5.4.2.940.g0f70f.dirty\n"}]}