Permalink
Browse files

create relative paths for posix, absolute for windows

  • Loading branch information...
mikahanninen committed Dec 12, 2012
1 parent 0380866 commit 78ea3299b50bbfebda8cd323df0cdc98657c4c4b
Showing with 6 additions and 1 deletion.
  1. +6 −1 rfgen.py
View
@@ -25,6 +25,7 @@
from time import strftime
from optparse import OptionParser
import urllib2
+import platform
ROOT = os.path.dirname(__file__)
lib = os.path.join(ROOT, '..', 'lib')
@@ -227,7 +228,11 @@ def _create_test_resources(dirs, resource_files, resources_in_file, external_res
static_external_resource.close()
external_resource_path = "%s%s" % (ext_dir, "ext_R%d_Resource.txt")
- external_resource_path_for_import = "%s%s%s%s" % (".." + os.sep, ".." + os.sep, "ext" + os.sep, "ext_R%d_Resource.txt")
+
+ if os.name == 'posix':
+ external_resource_path_for_import = "%s%s%s%s" % (".." + os.sep, ".." + os.sep, "ext" + os.sep, "ext_R%d_Resource.txt")
+ else:
+ external_resource_path_for_import = "%s%s" % (ext_dir, "ext_R%d_Resource.txt")
for resfile_index in range(resource_files):
basename = "R%d_Resource.txt" % (resfile_index+1)

0 comments on commit 78ea329

Please sign in to comment.