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

resolve() should return Windows Reparse Point #3896

Closed
wants to merge 37 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@mattn
Copy link

mattn commented Feb 2, 2019

Fixes #147

@mattn

This comment has been minimized.

Copy link
Author

mattn commented Feb 2, 2019

I'll add test

mattn added some commits Feb 2, 2019

@mattn

This comment has been minimized.

Copy link
Author

mattn commented Feb 2, 2019

https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfinalpathnamebyhandlea

MSDN says GetFinalPathNameByHandle is supported on Vista or later. I don't understand why appveyor fail.

mattn added some commits Feb 2, 2019

Show resolved Hide resolved src/testdir/test_functions.vim Outdated
@mattn

This comment has been minimized.

Copy link
Author

mattn commented Feb 3, 2019

Thank your information. I'll fix in later.

mattn added some commits Feb 3, 2019

@mattn

This comment has been minimized.

Copy link
Author

mattn commented Feb 3, 2019

Hmm, I have no idea to build this on MSSDK7.1

mattn added some commits Feb 3, 2019

@mattn

This comment has been minimized.

Copy link
Author

mattn commented Feb 4, 2019

I'll try to implement dynamic loading of GetFileInformationByHandleEx. So this thread will be noisy for a while. Sorry.

mattn added some commits Feb 4, 2019

@k-takata

This comment has been minimized.

Copy link
Member

k-takata commented Feb 4, 2019

I think resolve_reparse_point() should resolve the path only when it is a reparse point.
E.g. GetFileAttributes(path) & FILE_ATTRIBUTE_REPARSE_POINT

@k-takata

This comment has been minimized.

Copy link
Member

k-takata commented Feb 4, 2019

Document for resolve() should be also updated.
Does it always returns a fullpath even a symlink is relative?

Using the FSCTL_GET_REPARSE_POINT flag with DeviceIoControl() might be able to get a relative path, but it might not be necessary.

Show resolved Hide resolved src/testdir/test_functions.vim Outdated
Show resolved Hide resolved src/testdir/test_functions.vim Outdated

mattn added some commits Feb 4, 2019

mattn added some commits Feb 4, 2019

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Feb 4, 2019

Codecov Report

Merging #3896 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3896      +/-   ##
==========================================
- Coverage   78.83%   78.82%   -0.02%     
==========================================
  Files         105      105              
  Lines      142026   142066      +40     
==========================================
+ Hits       111970   111981      +11     
- Misses      30056    30085      +29
Impacted Files Coverage Δ
src/buffer.c 80.55% <ø> (ø) ⬆️
src/evalfunc.c 88.41% <ø> (ø) ⬆️
src/channel.c 83.16% <0%> (-0.49%) ⬇️
src/terminal.c 74.97% <0%> (-0.4%) ⬇️
src/userfunc.c 87.84% <0%> (-0.12%) ⬇️
src/ex_cmds2.c 84.89% <0%> (-0.1%) ⬇️
src/if_ruby.c 90.29% <0%> (ø) ⬆️
src/version.c 86.28% <0%> (ø) ⬆️
src/if_xcmdsrv.c 84.02% <0%> (ø) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 889da2f...04c3b1a. Read the comment docs.

Show resolved Hide resolved src/os_mswin.c Outdated
Show resolved Hide resolved runtime/doc/eval.txt Outdated

mattn added some commits Feb 4, 2019

Show resolved Hide resolved src/os_mswin.c Outdated

mattn added some commits Feb 4, 2019

@k-takata

This comment has been minimized.

Copy link
Member

k-takata commented Feb 4, 2019

LGTM 👍

@mattn

This comment has been minimized.

Copy link
Author

mattn commented Feb 4, 2019

BTW, it is not related on this issue. my travis got double-free

https://travis-ci.org/mattn/vim/jobs/488366344#L3283

Executing Test_1_set_secure()issing on display ":99.0".
': double free or corruption (out): 0x0000000001cb3360 ***
Vim: Caught deadly signal ABRT
Vim: Finished.
Aborted (core dumped)
make[1]: *** [test_gui.res] Error 134
make[1]: Leaving directory `/home/travis/build/mattn/vim/src/shadow/testdir'
make: *** [scripttests] Error 2
make: Leaving directory `/home/travis/build/mattn/vim/src/shadow'
The command "make $SHADOWOPT $TEST" exited with 2.
Show resolved Hide resolved src/os_mswin.c Outdated
Show resolved Hide resolved src/os_mswin.c Outdated
Show resolved Hide resolved src/os_mswin.c Outdated

mattn added some commits Feb 4, 2019

@mattn mattn force-pushed the mattn:reparse-point branch from fa1cd3c to 8240ba5 Feb 4, 2019

Show resolved Hide resolved src/os_mswin.c Outdated
Show resolved Hide resolved src/os_mswin.c Outdated

mattn added some commits Feb 4, 2019

@mattn mattn force-pushed the mattn:reparse-point branch from f08474f to a4a31f2 Feb 5, 2019

@mattn mattn force-pushed the mattn:reparse-point branch from a4a31f2 to 16f9f3a Feb 5, 2019

Show resolved Hide resolved src/testdir/test_functions.vim Outdated

mattn added some commits Feb 9, 2019

@brammool brammool closed this in dce1e89 Feb 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment