Skip to content

Commit

Permalink
Merge pull request #83 from NASA-PDS/backslash
Browse files Browse the repository at this point in the history
Resolve #82: standardize on Unix path sep during bundle comprehension
  • Loading branch information
jordanpadams authored Oct 9, 2020
2 parents 56722aa + f84d307 commit 3d3d9e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pds/aipgen/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def comprehendDirectory(dn, con):
con.execute('INSERT OR IGNORE INTO labels (lid, vid) VALUES (?, ?)', (lid, vid))
con.execute(
'INSERT OR IGNORE INTO label_file_references (lid, vid, filepath) VALUES (?,?,?)',
(lid, vid, xmlFile)
(lid, vid, xmlFile.replace('\\', '/'))
)

# Now see if it refers to other XML files
Expand Down Expand Up @@ -164,7 +164,7 @@ def comprehendDirectory(dn, con):
if os.path.isfile(filepath):
con.execute(
'INSERT OR IGNORE INTO label_file_references (lid, vid, filepath) VALUES (?,?,?)',
(lid, vid, filepath)
(lid, vid, filepath.replace('\\', '/'))
)
# Weird (to a certain degree of weird) case: <file_name> may refer to a file
# that contains even more inter_label_references, but only if this label is
Expand Down

0 comments on commit 3d3d9e5

Please sign in to comment.