mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 21:59:00 +02:00
Merge pull request #9658 from overleaf/em-dropbox-folder-sync
Sync folder creation from Dropbox to Overleaf GitOrigin-RevId: a2749ab8d9db7dd312818b46d6e72f1dbaaaff2e
This commit is contained in:
@@ -203,7 +203,7 @@ function _findElementByPathWithProject(
|
||||
function getEntity(folder, entityName, cb) {
|
||||
let result, type
|
||||
if (entityName == null) {
|
||||
return cb(null, folder, 'folder')
|
||||
return cb(null, folder, 'folder', null)
|
||||
}
|
||||
for (const file of iterablePaths(folder, 'fileRefs')) {
|
||||
if (matchFn(file != null ? file.name : undefined, entityName)) {
|
||||
@@ -227,7 +227,7 @@ function _findElementByPathWithProject(
|
||||
}
|
||||
|
||||
if (result != null) {
|
||||
cb(null, result, type)
|
||||
cb(null, result, type, folder)
|
||||
} else {
|
||||
cb(
|
||||
new Error(
|
||||
@@ -241,7 +241,7 @@ function _findElementByPathWithProject(
|
||||
return callback(new Error('Tried to find an element for a null project'))
|
||||
}
|
||||
if (needlePath === '' || needlePath === '/') {
|
||||
return callback(null, project.rootFolder[0], 'folder')
|
||||
return callback(null, project.rootFolder[0], 'folder', null)
|
||||
}
|
||||
|
||||
if (needlePath.indexOf('/') === 0) {
|
||||
@@ -317,6 +317,7 @@ module.exports = {
|
||||
findElementByPath: promisifyMultiResult(findElementByPath, [
|
||||
'element',
|
||||
'type',
|
||||
'folder',
|
||||
]),
|
||||
findRootDoc: promisifyMultiResult(findRootDoc, [
|
||||
'element',
|
||||
|
||||
Reference in New Issue
Block a user