Merge pull request #19292 from overleaf/jdt-mj-imported-at

copying a project should preserve a linked files created timestamp

GitOrigin-RevId: d82506db1fb3f54567e638346179413468419b82
This commit is contained in:
Jimmy Domagala-Tang 2024-07-08 12:46:06 -04:00 committed by Copybot
parent 0be042e331
commit e47a790af9
2 changed files with 2 additions and 0 deletions

View file

@ -194,6 +194,7 @@ async function _copyFiles(sourceEntries, sourceProject, targetProject) {
const file = new File({ name: SafePath.clean(sourceFile.name) })
if (sourceFile.linkedFileData != null) {
file.linkedFileData = sourceFile.linkedFileData
file.created = sourceFile.created
}
if (sourceFile.hash != null) {
file.hash = sourceFile.hash

View file

@ -18,6 +18,7 @@ describe('ProjectDuplicator', function () {
this.file2 = {
name: 'file2',
_id: 'file2',
created: '2024-07-05T14:18:31.401+00:00',
linkedFileData: { provider: 'url' },
hash: '123456',
}