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

Files from double nested folders being downloaded twice #90

Closed
Beebeeoii opened this issue Oct 13, 2022 · 1 comment
Closed

Files from double nested folders being downloaded twice #90

Beebeeoii opened this issue Oct 13, 2022 · 1 comment
Labels
bug Something isn't working unreproducible Issue not reproducible
Milestone

Comments

@Beebeeoii
Copy link
Owner

Describe the bug
This bug is quite random and I am not sure what is happening as it appears to affect 2 of my modules. Files in doubly nested folders are being downloaded twice - once in the correct location (which is to be in the double nested folders), and another time in the main directory.

For eg, we have a file 1.txt in ../CS2040S/Lectures/Lecture 1/1.txt, 1.txt seems to be downloaded in both ../CS2040S/Lectures/Lecture 1 (which is the correct behaviour) and ../CS2040S/Lecture 1 (which is the wrong behaviour).

To Reproduce
Simply syncing. However, it should be noted that I did not encounter this issue previously. It only surfaced recently without any changes to Lominus and the folder structure for the module is exactly the same.

Additional context
logfile:

[2022-10-13 22:11:44] DEBUG - downloading - CS2040S/Lab7/1DayAsg6.pdf [0001-01-01 00:00:00 +0000 UTC vs 2022-10-13 10:13:43 +0000 UTC] (/home/jiawei/Documents/lominus/internal/cron/cron.go:github.com/beebeeoii/lominus/internal/cron.createJob.func1:224)
[2022-10-13 22:11:45] DEBUG - downloading - CS2040S/Lab7/Lab7.pdf [0001-01-01 00:00:00 +0000 UTC vs 2022-10-13 10:13:43 +0000 UTC] (/home/jiawei/Documents/lominus/internal/cron/cron.go:github.com/beebeeoii/lominus/internal/cron.createJob.func1:224)
[2022-10-13 22:11:46] DEBUG - downloading - CS2040S/Labs/Lab7/1DayAsg6.pdf [0001-01-01 00:00:00 +0000 UTC vs 2022-10-13 10:13:43 +0000 UTC] (/home/jiawei/Documents/lominus/internal/cron/cron.go:github.com/beebeeoii/lominus/internal/cron.createJob.func1:224)
[2022-10-13 22:11:47] DEBUG - downloading - CS2040S/Labs/Lab7/Lab7.pdf [0001-01-01 00:00:00 +0000 UTC vs 2022-10-13 10:13:43 +0000 UTC] (/home/jiawei/Documents/lominus/internal/cron/cron.go:github.com/beebeeoii/lominus/internal/cron.createJob.func1:224)
@Beebeeoii Beebeeoii added bug Something isn't working unreproducible Issue not reproducible labels Oct 13, 2022
@Beebeeoii Beebeeoii added this to the 22/23 Winter milestone Nov 30, 2022
Beebeeoii pushed a commit that referenced this issue Dec 4, 2022
@Beebeeoii
Copy link
Owner Author

Issue should be fixed by c069d18. Files are duplicated because retrieval of folders in a module returns ALL nested folders. this resulted in duplication of files as each folder is being processed and files in each of them are being downloaded multiple times.

@Beebeeoii Beebeeoii mentioned this issue Dec 4, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible Issue not reproducible
Projects
None yet
Development

No branches or pull requests

1 participant