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

real_file_name does not follow symlinks on Windows #66

Closed
Jean-Luc-Picard-2021 opened this issue Oct 14, 2023 · 2 comments
Closed

real_file_name does not follow symlinks on Windows #66

Jean-Luc-Picard-2021 opened this issue Oct 14, 2023 · 2 comments

Comments

@Jean-Luc-Picard-2021
Copy link

Jean-Luc-Picard-2021 commented Oct 14, 2023

Is there a way to retrieve a real file name in GNU Prolog,
that results from following symlinks? Take this scenario of
a file symlink on Windows:

>dir foo
<SYMLINK>      f4.pl [..\bar\f3.pl]

I only get:

/* GNU Prolog 1.5.0 */
?- file_property('C:\\<dir>\\foo\\f4.pl', X).
X = real_file_name('C:/<dir>/foo/f4.pl') ? 

Whereas nodeJS gives me:

/* Node.js v20.7.0 */
> fs.realpathSync("C:\\<dir>\\foo\\f4.pl");
'C:\\<dir>\\bar\\f3.pl'
@Jean-Luc-Picard-2021
Copy link
Author

Jean-Luc-Picard-2021 commented Oct 14, 2023

The bug doesn't appear for other attributes, like here:

?- file_property('<dir>\\foo\\f3.pl', last_modification(X)).
X = dt(2023,10,14,17,16,14)

?- file_property('<dir>\\bar\\f4.pl', last_modification(X)).
X = dt(2023,10,14,17,16,14)

It seems to use stat and not lstat.

@Jean-Luc-Picard-2021
Copy link
Author

Possibly need to close this ticket anyway, this GitHub seems
to be completely dead, just like GNU Prolog. The ticket
was opened 12 months ago. It was neither classified by

severity nor otherwise touched by any GNU developer.

@Jean-Luc-Picard-2021 Jean-Luc-Picard-2021 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2024
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