Skip to content

Commit a93b5fb

Browse files
committed
update directory check
1 parent f745535 commit a93b5fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/requests.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ export async function getContents(
6464
'drives/' + driveName + '/' + options.path,
6565
'GET'
6666
);
67+
const isDir: boolean = PathExt.extname(options.path) === '';
6768

6869
if (response.data) {
6970
// listing the contents of a directory
70-
if (options.path.indexOf('.') === -1) {
71+
if (isDir) {
7172
const fileList: IContentsList = {};
7273

7374
response.data.forEach((row: any) => {

0 commit comments

Comments
 (0)