fix: fix the calculation of the justpath property in the File class

The `justpath` property in the File class was previously returning an incorrect value. The calculation was splitting the `path` string by '/' and then selecting a range of elements to join together. The range was specified as `slice(1, -2)`, which resulted in excluding the first element and including the second-to-last element. 

The fix updates the range to `slice(0, -1)`, which includes all elements except for the last one. This ensures that the `justpath` property correctly represents the path without the filename.
This commit is contained in:
Mattias Granlund 2023-12-03 02:05:42 +01:00
parent 080773be9f
commit 45dae4197d

View File

@ -33,7 +33,7 @@ export class File {
}
get justpath() {
return this.path.split('/').slice(1, -2).join('/');
return this.path.split('/').slice(0, -1).join('/');
}
}