Create cross platform symlinks
https://github.com/Skallwar/suckit/blob/5233aecbc15adcb08f72be93e5347eaf72621079/src/disk.rs#L40
Use cross platform symlink creation instead of std::os::unix::fs
destination will always be a directory, right?
destination will always be a directory, right?
No, a file
Hm to be honest I am not really sure I get why you need to create symlinks at all but assuming it's always for a file, I can do that with windows::os::fs::symlink_file
Hm to be honest I am not really sure I get why you need to create symlinks at all but
Sometime we discover a link wich is a pdf (eg. test.org/pdf/test.pdf). So a page wich contain a link to this file will replace every test.org/pdf/test.pdf by test_org_pdf_test_pdf. But the real name of this pdf (test.pdf) is only found when actualy processing the url (test.org/pdf/test.pdf). At this point we save the pdf to it's real filename and create a symlink between test.pdf and test_org_pdf_test_pdf
I can do that with windows::os::fs::symlink_file
Should be this one indeed
If you know of a url that needs this I can try to do it. Is that the only reason why it doesn't work in windows?
We think it's the only reason but haven't tried. There might be more to it. If you have a windows build available, feel free to try. I'll add it to the CI as well
I have a vm I can use but from what I understand it doesn't happen with every page you try to download, right?
True, symlinks aren't always created. The code calling disk::symlink() is here
I know, I am asking if you already know of a page that requires symlinks so I can easily test it
Oh my bad, sorry about the confusion. Any page downloading PDFs basically, so a page like https://dl.acm.org/doi/book/10.1145/3368274 is good.