Skip to content

Commit

Permalink
return full path for folders
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrehault committed Apr 25, 2024
1 parent 7ef650c commit 96d79a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class DropboxImpl extends OAuthBaseConnector implements IConnector {
title: raw.name || '',
originalId: (isFolder ? raw.path_lower : raw.id) || '',
metadata: {
path: raw.path_lower.split('/').slice(0, -1).join('/'),
path: raw.path_lower,
},
status: FileStatus.PENDING,
uuid: (isFolder ? raw.path_lower : raw.id) || '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class FolderImpl implements IConnector {
originalId: file,
mimeType: lookup(file) || 'application/octet-stream',
metadata: {
path: file.split('/').slice(0, -1).join('/'),
path: file,
},
status: FileStatus.PENDING,
uid: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class GDriveImpl extends OAuthBaseConnector implements IConnector {
...folder,
metadata: {
...folder.metadata,
path: getFolderPath(folder.parents?.[0]).join('/'),
path: ['', ...getFolderPath(folder.parents?.[0]), folder.title].join('/'),
},
}));
return {
Expand Down Expand Up @@ -217,7 +217,7 @@ export class GDriveImpl extends OAuthBaseConnector implements IConnector {
...item,
metadata: {
...item.metadata,
path: getFolderPath(item.parents?.[0]).join('/'),
path: ['', ...getFolderPath(item.parents?.[0])].join('/'),
},
}));
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class OneDriveImpl extends OAuthBaseConnector implements IConnector {
title: item.name,
originalId: item.id,
metadata: {
path: item.parentReference.path,
path: `${item.parentReference.path}/${item.name}`,
},
status: FileStatus.PENDING,
isFolder: true,
Expand Down

0 comments on commit 96d79a3

Please sign in to comment.