@@ -88,7 +88,9 @@ export async function getContents(
8888
8989 fileList [ fileName ] = fileList [ fileName ] ?? {
9090 name : fileName ,
91- path : driveName + '/' + row . path ,
91+ path : options . path
92+ ? PathExt . join ( driveName , options . path , fileName )
93+ : PathExt . join ( driveName , fileName ) ,
9294 last_modified : row . last_modified ,
9395 created : '' ,
9496 content : ! fileName . split ( '.' ) [ 1 ] ? [ ] : null ,
@@ -102,8 +104,8 @@ export async function getContents(
102104 } ) ;
103105
104106 data = {
105- name : options . path ? PathExt . basename ( options . path ) : '' ,
106- path : options . path ? options . path + '/' : '' ,
107+ name : options . path ? PathExt . basename ( options . path ) : driveName ,
108+ path : PathExt . join ( driveName , options . path ? options . path + '/' : '' ) ,
107109 last_modified : '' ,
108110 created : '' ,
109111 content : Object . values ( fileList ) ,
@@ -123,7 +125,7 @@ export async function getContents(
123125
124126 data = {
125127 name : PathExt . basename ( options . path ) ,
126- path : driveName + '/' + response . data . path ,
128+ path : PathExt . join ( driveName , response . data . path ) ,
127129 last_modified : response . data . last_modified ,
128130 created : '' ,
129131 content : response . data . content ,
0 commit comments