diff --git a/components/server/src/workspace/config-provider.ts b/components/server/src/workspace/config-provider.ts index 218d107f54afd4..663a41e2277168 100644 --- a/components/server/src/workspace/config-provider.ts +++ b/components/server/src/workspace/config-provider.ts @@ -260,7 +260,7 @@ export class ConfigProvider { } const repoHost = hostContext.services; const lastDockerFileSha = await repoHost.fileProvider - .getLastChangeRevision(repository, revisionOrTagOrBranch, user, dockerFilePath) + .getLastChangeRevision(repository, revisionOrTagOrBranch, user, path.normalize(dockerFilePath)) .catch((e) => { if (e instanceof RevisionNotFoundError) { return ImageFileRevisionMissing; diff --git a/components/server/src/workspace/image-source-provider.ts b/components/server/src/workspace/image-source-provider.ts index d415a65bf295da..e1d96f51412137 100644 --- a/components/server/src/workspace/image-source-provider.ts +++ b/components/server/src/workspace/image-source-provider.ts @@ -5,6 +5,8 @@ */ import { injectable, inject } from "inversify"; +import { createHash } from "crypto"; +import path from "path"; import { HostContextProvider } from "../auth/host-context-provider"; import { TraceContext } from "@gitpod/gitpod-protocol/lib/util/tracing"; import { @@ -18,7 +20,6 @@ import { User, AdditionalContentContext, } from "@gitpod/gitpod-protocol"; -import { createHash } from "crypto"; import { ImageFileRevisionMissing, RevisionNotFoundError } from "../repohost"; @injectable() @@ -45,7 +46,12 @@ export class ImageSourceProvider { throw new Error(`Cannot fetch workspace image source for host: ${repository.host}`); } const lastDockerFileSha = await hostContext.services.fileProvider - .getLastChangeRevision(repository, imgcfg.externalSource.revision, user, imgcfg.file) + .getLastChangeRevision( + repository, + imgcfg.externalSource.revision, + user, + path.normalize(imgcfg.file), + ) .catch((e) => { if (e instanceof RevisionNotFoundError) { return ImageFileRevisionMissing; @@ -76,7 +82,7 @@ export class ImageSourceProvider { throw new Error(`Cannot fetch workspace image source for host: ${context.repository.host}`); } const lastDockerFileSha = await hostContext.services.fileProvider - .getLastChangeRevision(context.repository, context.revision, user, imgcfg.file) + .getLastChangeRevision(context.repository, context.revision, user, path.normalize(imgcfg.file)) .catch((e) => { if (e instanceof RevisionNotFoundError) { return ImageFileRevisionMissing;