Skip to content

File contents differs on mounted Windows drive between Windows and WSL #4064

@pmsanford

Description

@pmsanford
  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.18898.1000]

  • What you're doing and what's happening:
    My setup:

  • Mount location is changed from /mnt to /, so for example C:\Users is at /c/Users
  • I have a directory containing source code for various projects under C:\Users\account\dev
  • I have a symlink from /c/Users/account/dev to /home/account/dev
  • I edit files under ~/dev with editors in Windows, but run tests/servers/etc under WSL

Please note that I am not attempting to edit files under the WSL filesystem from windows; I am editing files in the Windows filesystem from windows and then accessing them from within WSL.

The specific problem I'm posting about is that occasionally when I'm editing files in IntelliJ, the content of the files will stop changing when viewed from WSL. This only started happening with the latest fast ring updates. I haven't noticed this happening with files edited by things other than IntelliJ, but around the latest update I switched to editing python/js with VS Code's remote WSL extension, so that could be a red herring.

If I restart LxssManager or reboot the computer, this is fixed for a while. I have not been able to identify anything specific that triggers this.

Another ongoing issue (which is not a WSL issue) is that editing files with IntelliJ resets their permissions to whatever the mask for the mounted drive is is. I assume (but have not confirmed) this is because IntelliJ writes to files by deleting and recreating them. This could be why only files edited in IntelliJ exhibit this problem.

The file content is the same no matter what method I use to open it (meaning git, with a WSL-side editor like vim, with cat, the binaries built by maven, etc).

  • What's wrong / what should be happening instead:
    Changes made to files in C:\Users\account\dev on Windows should be reflected immediately on /c/Users/account/dev in WSL..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions