Skip to content

Commit

Permalink
Avoid creating '.' paths in BDT
Browse files Browse the repository at this point in the history
  • Loading branch information
kounch committed Jul 11, 2020
1 parent 18ffc0a commit a938026
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/bdt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def main():
str_path = str_path[:-1]
if len(str_path) > 1 and str_path[1] == ':':
str_path = str_path[2:]
if str_path == '.':
str_path = ''
if not str_path:
str_path = '/'
f.write('{0}\r\n'.format(str_path))
Expand Down Expand Up @@ -278,6 +280,8 @@ def scan_dir(input_dir, str_prefix, str_detection):
str_dir = str_dir.replace('\\', '/')
if str_dir[0] == '/':
str_dir = str_dir[1:]
if str_dir == '.':
str_dir = ''
zxfile = zxfile.replace('\\', '/')
arr_tmp = [zxname, zxmode, str_dir, zxfile]
break
Expand Down

0 comments on commit a938026

Please sign in to comment.