threads / patch / 13862

patchmake_nonrelative_path: Use is_absolute_path()

Subject: [PATCH] make_nonrelative_path: Use is_absolute_path()

## tl;dr

One message between Jun 8, 2008 and Jun 8, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Johannes Sixt· Jun 8, 2008, 14:34 UTC · lore
This helps porting to Windows.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 path.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to path.c +1 −1
diff --git a/path.c b/path.c
index 7c3b89a..5da41c7 100644
--- a/path.c
+++ b/path.c
@@ -321,7 +321,7 @@ const char *make_nonrelative_path(const char *path)
 {
 	static char buf[PATH_MAX + 1];
 
-	if (path[0] == '/') {
+	if (is_absolute_path(path)) {
 		if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
 			die ("Too long path: %.*s", 60, path);
 	} else {
-- 
1.5.6.rc2.6.g3056b

← back to recent threads