Fix course files
This commit is contained in:
@@ -112,7 +112,11 @@ func (c *Client) DownloadCourseFiles(root string) {
|
|||||||
|
|
||||||
subDir := root
|
subDir := root
|
||||||
if !c.FilesOnly {
|
if !c.FilesOnly {
|
||||||
|
if safeFolderPath != "" && strings.ToLower(safeFolderPath) != "course files" {
|
||||||
subDir = filepath.Join(root, "Course Files", safeFolderPath)
|
subDir = filepath.Join(root, "Course Files", safeFolderPath)
|
||||||
|
} else {
|
||||||
|
subDir = filepath.Join(root, "Course Files")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
os.MkdirAll(subDir, 0o755)
|
os.MkdirAll(subDir, 0o755)
|
||||||
path := filepath.Join(subDir, utils.Sanitize(file.DisplayName))
|
path := filepath.Join(subDir, utils.Sanitize(file.DisplayName))
|
||||||
|
|||||||
Reference in New Issue
Block a user