summaryrefslogtreecommitdiff
path: root/components/dfs/filesystems
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2014-02-25 13:43:59 +0800
committerBernard Xiong <[email protected]>2014-02-25 13:43:59 +0800
commit3d80e414ff6c03ff04fecb914e7aa9b3fb535e03 (patch)
tree8c256ce8cf3ad3843dbcf913ca60db0c686c3fd9 /components/dfs/filesystems
parent213f47e380e87a26d60ba630a8256cb63224d2aa (diff)
[JS] fix the include path issue
Diffstat (limited to 'components/dfs/filesystems')
-rw-r--r--components/dfs/filesystems/romfs/mkromfs.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/components/dfs/filesystems/romfs/mkromfs.py b/components/dfs/filesystems/romfs/mkromfs.py
index a84458e892..d1354eb259 100644
--- a/components/dfs/filesystems/romfs/mkromfs.py
+++ b/components/dfs/filesystems/romfs/mkromfs.py
@@ -4,6 +4,7 @@ import string
basename = ''
output = ''
+sep = os.sep
def mkromfs_output(out):
# print '%s' % out,
@@ -54,12 +55,12 @@ def mkromfs_dir(dirname, is_root = False):
fullpath = os.path.join(path, item)
if os.path.isfile(fullpath):
subpath = fullpath[len(basename):]
- array = subpath.split('\\')
+ array = subpath.split(sep)
arrayname = string.join(array, '_')
mkromfs_file(fullpath, arrayname)
subpath = path[len(basename):]
- dir = subpath.split('\\')
+ dir = subpath.split(sep)
direntname = string.join(dir, '_')
if is_root:
mkromfs_output('const struct romfs_dirent _root_dirent[] = {\n')
@@ -69,12 +70,12 @@ def mkromfs_dir(dirname, is_root = False):
for item in list:
fullpath = os.path.join(path, item)
fn = fullpath[len(dirname):]
- if fn[0] == '\\':
+ if fn[0] == sep:
fn = fn[1:]
fn = fn.replace('\\', '/')
subpath = fullpath[len(basename):]
- items = subpath.split('\\')
+ items = subpath.split(sep)
item_name = string.join(items, '_')
item_name = item_name.replace('.', '_')
item_name = item_name.replace('-', '_')
@@ -92,12 +93,12 @@ def mkromfs_dir(dirname, is_root = False):
for item in list:
fullpath = os.path.join(path, item)
fn = fullpath[len(dirname):]
- if fn[0] == '\\':
+ if fn[0] == sep:
fn = fn[1:]
fn = fn.replace('\\', '/')
subpath = fullpath[len(basename):]
- items = subpath.split('\\')
+ items = subpath.split(sep)
item_name = string.join(items, '_')
item_name = item_name.replace('.', '_')
item_name = item_name.replace('-', '_')