Skip to content

File Modification Timestamps Not Updated When Editing Files in Container #224472

Closed as not planned
@aguoblue

Description

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.91.1
  • OS Version: ubuntu22.04

Steps to Reproduce:

When using the VSCode Docker extension to develop within a container, I encountered an issue where modifying files through VSCode does not update the file's modification timestamp in the container.

  1. Run a Docker container with the following command:
    docker run --rm -it --name test11 ubuntu:20.04 bash
  2. Inside the container, create a new file and check its timestamp:
    touch test.cpp && ls -la
    Wait for a minute to ensure a noticeable difference in time.
  3. In VSCode, open and modify the test.cpp file, then save the changes.
    Return to the container and verify the file contents:
    cat test.cpp
    The changes are present, confirming the file was modified.
    Check the file's timestamp again:
    ls -la
    The modification timestamp remains unchanged and reflects the time the file was initially created, not the time of the recent modification.

Additional Information
I discovered this issue while using cmaketo build a project. Although the file contents were modified, the unchanged modification timestamp caused make to not recognize the file as updated, thus not triggering a rebuild as expected.

This issue significantly affects build processes and file tracking, as tools relying on file modification timestamps (such as make) may not function correctly.

I appreciate any insights or fixes for ensuring file modification timestamps are correctly updated when using the VSCode Docker extension.

Thank you.

Activity

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

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions