From 15ff0ace59feabff87d2b39a400b66bf87b850e1 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Thu, 2 Apr 2009 17:40:37 -0400 Subject: [PATCH] Attempt to make PATH_SEP code work on OS/X. Catch initWithPath(/) exception. --- common/content/io.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/io.js b/common/content/io.js index 130b005b..911db5bd 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -1102,8 +1102,9 @@ lookup: IO.PATH_SEP = (function () { let file = services.create("file"); - file.append("foo"); - return file.path[0]; + let pathsep = "/"; + try { file.initWithPath("/") } catch(e) { pathsep = "\\"; } + return pathsep; })(); /**