Beebeeoii / lominus

NUS Canvas file sync
MIT License
60 stars 7 forks source link

Sync keeps going for folders with dots in the end #89

Closed RussellDash332 closed 1 year ago

RussellDash332 commented 2 years ago

Describe the bug Similar to #88 but this time it keeps downloading instead of an error. This is because the folder created omits the dot at the back so it keeps assuming the files aren't there yet.

Logfile snapshot

[2022-09-21 11:37:38] DEBUG - downloading - EC1101E/Exam Instructions etc./EC1101E Midterm Exam Instructions.pdf [0001-01-01 00:00:00 +0000 UTC vs 2022-09-16 18:06:01.36 +0800 +08] (D:/jiawei/projects/lominus/internal/cron/cron.go:github.com/beebeeoii/lominus/internal/cron.createJob.func1:224)
[2022-09-21 11:37:38] INFO - job completed: 2022-09-21T11:37:38+08:00 (D:/jiawei/projects/lominus/internal/cron/cron.go:github.com/beebeeoii/lominus/internal/cron.createJob.func1:275)

OS Windows 10

RussellDash332 commented 2 years ago

This seems to be a Windows-only issue so far. Not sure for Mac, but I think this doesn't happen on Linux because it doesn't auto-truncate directories ending with dots. The ad-hoc solution is to use bash to force-create the directory with mkdir.

Beebeeoii commented 1 year ago

issue should be resolved by https://github.com/Beebeeoii/lominus/commit/0a74143b1294463124a9301952f3f8f8dda55056 from MR https://github.com/Beebeeoii/lominus/pull/96. Issue was caused by not cleansing of folder names of trailing periods '.'

RussellDash332 commented 1 year ago

issue should be resolved by 0a74143b1294463124a9301952f3f8f8dda55056

Great! Let me test with a sandbox course on Canvas later

Beebeeoii commented 1 year ago

resolved with #96