Closed ben-larson closed 2 years ago
Using an empty string as the volume works on macOS, so I put in pull request #81 for that. I do not have access to Linux or Windows systems to test it out, so I left it as a draft pull request, but if it works on those then it is ready for review.
Thanks for the fantastic bug report and fix! I'm sorry it has taken me so long to get back to you -- it has been a very busy university term.
I was fixing a problem with Windows users where the volume appeared in the path twice. Removing the volume from the call to catpath
fixed it on Windows, but broke it on Mac. Your fix is correct and I have merged it. I should have supplied an empty volume instead.
The reason I did not catch this before is that it typically does not break searching the TLG; it just breaks chronological searching, which is a very new feature. I'm not sure why it broke things more badly for you.
Note that the -P argument for the server is obsolete and was never used to indicate the location of the TLG. It was used once upon a time for telling the server where the Perseus data was located.
When I search for an author in TLG Texts corpus, I get an error page.
Steps to reproduce:
server/diogenes-server.pl -d -P ~/Documents/TLG-E
What I think the problem is
Disclaimer: not a perl developer
There was a commit called Fix chron search filename paths on Windows. (https://github.com/pjheslin/diogenes/commit/e1126a4c200f03fe0c4dcfae276a89700b4e2f7b) which removed
$vol
from a call toFile::Spec->catpath
. I think this broke unix systems, because the [documentation](https://perldoc.perl.org/File::Spec#catpath()) forFile::Spec
says:I think it expects the volume to be the first of three arguments, so it just ignores the first one on unix systems. Based on my logging, only the file name is being returned by
catpath
.When I put
$vol
back, it works.Please let me know if there's more context I can provide, or if I'm just confused and this is just due to misconfiguration on my end.