Open muneue-suwa opened 1 year ago
I can't reproduce the problem on my Win10 22H2. Why is $symlink_exists
true on your system? Are you using an external perl? Or is it specific to Win Pro?
Why is $symlink_exists true on your system?
I have no idea. Let me know which variable I should confirm, if you possible.
Are you using an external perl?
I do not use external perl and just used pdfcrop
command. (I did not install perl to my PC)
Or is it specific to Win Pro?
I do not have Windows Home PC. I'll ask my friend who has it in a few days.
Certainly, this error does not occur in my friend's PC which is Windows 11 Home 21H2. There is a high probability that the error are specific to Windows Pro.
The issue still exists for build 22H2. A dirty workaround is to allow any users to create symlinks via the group policy editor.
https://stackoverflow.com/questions/58038683/allow-mklink-for-a-non-admin-user
@endereye probably changing
my $symlink_exists = eval {
local $SIG{'__DIE__'};
symlink("", "");
1;
};
to
my $symlink_exists = 0;
unless ($win) {
$symlink_exists =eval {
local $SIG{'__DIE__'};
symlink("", "");
1;
};
}
fixes it (untested) but it would be good to know how symlink_exists gets set to true in systems where the user doesn't have permission to generate a symlink as a more logically correct test would be to fix the $symlink_exists =eval {
rather than just avoiding windows.
Permission error occurs in Windows OS as follows.
I am using
I think the
symlink
command in l.711 is the cause of the error. Because Windows OS required administrator permission to create symbolic links.It seems that pdfcrop.pl has the feature to switch
symlink
command tocopy
command using$symlink_exists
. However, I guess the feature does not work well. Therefore, I suggest we should switch tocopy
command in Windows OS regardless of$symlink_exists
.