From 7dc432d1473439342e0b2e47e030d8ae06608ea6 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 4 Apr 2009 20:13:02 +1100 Subject: [PATCH] Refactor IO.PATH_SEP. --- common/content/io.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/content/io.js b/common/content/io.js index b02e1f8b..8cf02c2f 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -1101,10 +1101,9 @@ lookup: }; //}}} IO.PATH_SEP = (function () { - let file = services.create("file"); - let pathsep = "/"; - try { file.initWithPath("/"); } catch(e) { pathsep = "\\"; } - return pathsep; + let f = services.get("directory").get("CurProcD", Ci.nsIFile); + f.append("foo"); + return f.path.substr(f.parent.path.length, 1); })(); /**