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

Avoid trying to set permissions on the cache directory on windows #18867

Merged

Conversation

cescoffier
Copy link
Member

Fix #16895

@rsvoboda This is the approach not trying to set the permission on windows. However, not sure it works on Windows using the WSL emulation.

@famod
Copy link
Member

famod commented Jul 20, 2021

@cescoffier

However, not sure it works on Windows using the WSL emulation.

FWIW, WSL2 Ubuntu reports Linux as os.name. I don't have a WSL1 dist around, but I'm 90% sure it'll do the same.

@rsvoboda
Copy link
Member

I don't have Windows with WSL around to double check this :/
Even if WSL is not handled well I think this is move in the right direction for vanilla Windows.

@cescoffier cescoffier force-pushed the fix-windows-cache-directory-warning branch from 7b51196 to 4a52216 Compare July 21, 2021 15:25
if (!os.contains("windows")) {
// Do not execute the following on windows.
if (!(tmp.setReadable(true, false) && tmp.setWritable(true, false))) {
LOGGER.warnf("Unable to make the Vert.x cache directory (%s) world readable and writable",
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated question but why are we trying to make it world writable? Shouldn't it be only writable by the current user? Am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a structure. The first level is world writable as multiple Quarkus app started by multiple users will write into it. The nested level is limited to the user.

@gsmet gsmet dismissed their stale review July 21, 2021 15:34

Addressed

@rsvoboda rsvoboda merged commit 08afe29 into quarkusio:main Jul 23, 2021
@quarkus-bot quarkus-bot bot added this to the 2.2 - main milestone Jul 23, 2021
@cescoffier cescoffier deleted the fix-windows-cache-directory-warning branch August 1, 2021 07:32
@gsmet gsmet modified the milestones: 2.2 - main, 2.1.1.Final Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to make the Vert.x cache directory in Windows
4 participants