Skip to content

Windows: Add support for SYMLINKS#37

Merged
adammurdoch merged 2 commits intogradle:masterfrom
rpaquay:add-symlink-support
Jul 16, 2019
Merged

Windows: Add support for SYMLINKS#37
adammurdoch merged 2 commits intogradle:masterfrom
rpaquay:add-symlink-support

Conversation

@rpaquay
Copy link
Contributor

@rpaquay rpaquay commented May 20, 2019

Windows: Add support for SYMLINKS

  • Both stat and readdir entry points support returning FILE_TYPE_SYMLINK
  • Both stat and readdir entry points support the "followLink" parameter
  • Add a stat-L option in the test app (stat with followLink option)
  • Add a ls-L option in test app (ls with followLink option)
  • Requires Windows Vista/Windows Server 2008 or later

@rpaquay rpaquay force-pushed the add-symlink-support branch 3 times, most recently from f3ec80d to f852195 Compare May 29, 2019 16:14
@lacasseio
Copy link

@rpaquay Could you remove the commits already submitted as PR for #34 and #37. It makes it harder to review the PR.

pFileStat->fileType = FILE_TYPE_FILE;
}
return ERROR_SUCCESS;
#else //WINDOWS_MIN: Windows Vista+ support for symlinks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's safe to assume the code will be running on Windows Vista+

@rpaquay
Copy link
Contributor Author

rpaquay commented May 31, 2019

@adammurdoch @lacasseio

fyi: I added a commit (5c890ef) that contains unit tests (in the FilesTest.groovy file) for "stat" and "readdir" using symbolic links.

Unfortunately, for these test to run on Windows, you either need to run them in an "elevated" command prompt, or with Windows 10 with developer mode enabled. This is a Windows limitation that cannot be worked around. This restriction is only for creating symbolic links, though (reading them is fine without extra privileges).

rpaquay added 2 commits June 12, 2019 11:56
* Both `stat` and `readdir` entry points support returning FILE_TYPE_SYMLINK
* Both `stat` and `readdir` entry points support the "followLink" parameter
* Add a `stat-L` option in the test app (`stat` with `followLink` option)
* Add a `ls-L` option in test app (`ls` with `followLink` option)
* Requires Windows Vista/Windows Server 2008 or later
* The tests only run on Windows Vista+ in an elevated command prompt,
  or on Windows 10+ in developer mode.
* See https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10
  for details on these restrictions.
@rpaquay rpaquay force-pushed the add-symlink-support branch from 5c890ef to d9588ba Compare June 12, 2019 19:01
@rpaquay
Copy link
Contributor Author

rpaquay commented Jun 25, 2019

@adammurdoch @lacasseio

Ping? Anything I can do to move this PR forward?

@adammurdoch
Copy link
Contributor

@rpaquay your changes look good, I'll merge them soon. Apologies for taking so long to review your PR.

@adammurdoch adammurdoch merged commit d9588ba into gradle:master Jul 16, 2019
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

Successfully merging this pull request may close these issues.

3 participants