Skip to content

Commit

Permalink
update directory check
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisaCG committed Nov 22, 2024
1 parent f745535 commit a93b5fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ export async function getContents(
'drives/' + driveName + '/' + options.path,
'GET'
);
const isDir: boolean = PathExt.extname(options.path) === '';

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

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

0 comments on commit a93b5fb

Please sign in to comment.