@@ -632,6 +632,7 @@ class RemoteFile implements GalleryFile {
632
632
+modificationDate: Date;
633
633
+path: $ReadOnlyArray<GalleryFile>;
634
634
downloadHref: void | (() => Promise<UrlType>);
635
+ logicPath: string;
635
636
remotePath: string;
636
637
#cachedDownloadHref: UrlType | void;
637
638
@@ -642,7 +643,7 @@ class RemoteFile implements GalleryFile {
642
643
fileSize,
643
644
modificationDate,
644
645
path,
645
- remotePath ,
646
+ logicPath ,
646
647
token,
647
648
}: {|
648
649
nfsId: number | null,
@@ -651,7 +652,7 @@ class RemoteFile implements GalleryFile {
651
652
fileSize: number,
652
653
modificationDate: Date,
653
654
path: $ReadOnlyArray<GalleryFile>,
654
- remotePath : string,
655
+ logicPath : string,
655
656
token: string,
656
657
|}) {
657
658
this.nfsId = nfsId;
@@ -661,7 +662,8 @@ class RemoteFile implements GalleryFile {
661
662
this.size = fileSize;
662
663
this.modificationDate = modificationDate;
663
664
this.path = path;
664
- this.remotePath = remotePath;
665
+ this.logicPath = logicPath;
666
+ this.remotePath = logicPath.split(":").slice(1).join(":");
665
667
if (!this.isFolder) {
666
668
const filestoreId = path[0].id;
667
669
this.downloadHref = async () => {
@@ -670,7 +672,7 @@ class RemoteFile implements GalleryFile {
670
672
idToString(this.id).do((id) => {
671
673
urlSearchParams.append("remoteId", id);
672
674
});
673
- urlSearchParams.append("remotePath", remotePath);
675
+ urlSearchParams.append("remotePath", this. remotePath);
674
676
const { data: blob } = await axios.get<Blob>(
675
677
` / api / v1 / gallery / filestores / $ { idToString (
676
678
filestoreId
@@ -699,7 +701,7 @@ class RemoteFile implements GalleryFile {
699
701
}
700
702
701
703
get key(): string {
702
- return this.remotePath ;
704
+ return this.logicPath ;
703
705
}
704
706
705
707
get extension(): string | null {
@@ -1398,7 +1400,7 @@ export function useGalleryListing({
1398
1400
.flatMap(Parsers.parseDate)
1399
1401
.elseThrow();
1400
1402
1401
- const remotePath = Parsers.getValueWithKey("logicPath")(obj)
1403
+ const logicPath = Parsers.getValueWithKey("logicPath")(obj)
1402
1404
.flatMap(Parsers.isString)
1403
1405
.elseThrow();
1404
1406
@@ -1410,7 +1412,7 @@ export function useGalleryListing({
1410
1412
fileSize,
1411
1413
modificationDate,
1412
1414
path: pa,
1413
- remotePath ,
1415
+ logicPath ,
1414
1416
token,
1415
1417
})
1416
1418
);
0 commit comments