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

Symlink parameter inverted and broken symlinks #123

Open
va1entin opened this issue Jan 1, 2025 · 0 comments
Open

Symlink parameter inverted and broken symlinks #123

va1entin opened this issue Jan 1, 2025 · 0 comments

Comments

@va1entin
Copy link
Contributor

va1entin commented Jan 1, 2025

Hi @pldubouilh

symlinks stopped working from 1861de0 onwards for me as reported by @jtitley in #121. I'm opening a new issue to provide more info and describe the behavior I'm seeing as detailed as I can.

  1. The -symlinks parameter's behavior is inverted in the file list (true results in false behavior and vice versa)
  2. Symlinks in the file list are broken

I'm not proficient in Go but found that an if condition checking the value of symlinks in func replyList was inverted in said commit from if !*symlinks to if *symlinks.

Here are my tests and their results on the current Gossa master branch/release v1.1.2 with Go 1.23.0 and 1.23.4

-symlinks=false

./gossa -symlinks=false test-fixture/compress

Expected result: No symlinks in the file list
Actual result: I get a broken link to the symlink hols-sym
Gossa logs the following when I click on the link
error [get content /hols-sym] invalid path

Expected and actual result: I can not access the symlink directly via localhost:8001/hols-sym

-symlinks=true

./gossa -symlinks=true test-fixture/compress

Expected result: Working link to symlink hols-sym
Actual result: No symlinks in the file list

Expected result: I can access the symlink directly via localhost:8001/hols-sym and open/download files, moving up to the main folder works
Actual result: I can access the symlink directly via localhost:8001/hols-sym but opening/downloading files doesn't work, moving back up to the main folder works
Gossa logs indicate that it's not resolving the symlink and just trying to open the files as if they were in the directory that contains the symlink itself
error [get content /glasgow.jpg] stat /home/val/git/gossa/test-fixture/compress/glasgow.jpg: no such file or directory
The proper path would be test-fixture/hols/glasgow.jpg

Reverting the particular change in replyList outlined above fixes problem 1 for me but problem 2 remains.

I hope the test results are helpful and I'm happy to conduct more testing.

Have a great start to 2025 and thanks again for the great work on Gossa! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant