Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path naming fix #315

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions blackboard_sync/content/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, content: BBCourseContent, api_path: BBContentPath,
self.handler = None

self.ignore = not Content.should_download(content, job)
self.is_ultra_document_body = content.title == "ultraDocumentBody"

if self.ignore:
return
Expand All @@ -50,12 +51,13 @@ def __init__(self, content: BBCourseContent, api_path: BBContentPath,
BBBadRequestError, BBForbiddenError, RequestException):
logger.warning(f"Error fetching body of {content.title}")


def write(self, path: Path, executor: ThreadPoolExecutor):
if self.ignore:
if self.ignore and not self.is_ultra_document_body:
return

# Build nested path with content title
path = path / self.title
path = path / self.title if not self.is_ultra_document_body else path

if self.handler is not None:
if self.handler.create_dir:
Expand Down
Loading