Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Sync issue copying from similar projects #3125

Open
mattcolegate opened this issue Jun 11, 2020 · 1 comment
Open

Sync issue copying from similar projects #3125

mattcolegate opened this issue Jun 11, 2020 · 1 comment

Comments

@mattcolegate
Copy link
Contributor

Codewind version: latest
OS: Windows 10, though I expect this happens everywhere

Che version: N/A
IDE extension version: latest
IDE version: Eclipse 2019-04
Kubernetes cluster: N/A

Description: Whilst doing test work for eclipse-archived/codewind-installer#494, I discovered that if I copied an index.html from an old node project and replaced the same file in a newer node project, the change did not get picked up. This is because the Eclipse IDE preserves the last modified date of the old file when overwriting the new, and because this file path already existed it was not flagged as an addition of a new file.

Steps to reproduce:

  1. Using the Eclipse IDE, bring up Cpdewind and create two 'Node.js Express' projects. Wait for them to come up.
  2. Alter the first project's public/index.html's header to read "You are currently running a Node.js app built by Eclipse Codewind - Edit 1." Save and launch the application, and verify that the message appears as edited.
  3. Alter the second project's public/index.html's header to read "You are currently running a Node.js app built by Eclipse Codewind - Edit 2." Save and launch the application, and verify that the message appears as edited.
  4. Copy the first project's public/index.html and overwrite the second project's public/index.html. Wait for 30 seconds (to allow time for syncing) then open the second project's application. Note that the message has not changed.

Workaround:

Instead of copying the file, cut and paste the file contents. This will register as a new edit and update the 'modified' timestamp to the current time, meaning sync will pick it up.

@jgwest
Copy link
Contributor

jgwest commented Jun 11, 2020

Similar to:
#1953
#2860

See @stalleyj's description of the reason for the failure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants