Simon-Initiative / course-digest

Tool to produce a summary or digest of OLI course package contents
MIT License
2 stars 0 forks source link

ensure flattened file paths deconflict #24

Closed rgachuhi closed 2 years ago

rgachuhi commented 2 years ago

This PR handles the case where multiple files in webcontent folders at various depths within a course package folder end up in the same location at the now flattened webcontent folder structure. The solution is to first sort by file path, then insert a guid into the file path at any subsequent path collision.

Example for the file structure below package_name --webcontent ----repl.js --secondary_level ----webcontent ------repl.js

There resulting flattened webcontent folder would be webcontent --repl.js --457383 (guid) ----repl.js

This PR fixes two other bugs.