Hi. There's an issue with the paths written in an index by tscmd -m indexer : instead of being relative to the location, the path is relative to the first directory in each file's absolute path (e.g. /home/, /media/, etc.).
This does not affect files directly under the location ($location/*).
This happens with both v2.1.53 and v3.0.2, using node.js v16.20.1.
/mnt/test/loc$ tree
.
├── dir
│ └── dirfile
└── locfile
1 directory, 2 files
/mnt/test/loc$ tscmd -m indexer .
Error listing meta directory ./.ts
Error listing meta directory ./dir/.ts
Error listing meta directory ./dir/.ts
Directory index created . containing 3
Saving file: ./.ts/tsi.json
Index persisted for: . to ./.ts/tsi.json
Index generated in folder: .
/mnt/test/loc$ jq . .ts/tsi.json
[
{
"uuid": "4d6ab1361bae4a64ad421c3f872169dc",
"name": "dir",
"isFile": false,
"path": "dir", // Correct
"extension": "",
"tags": []
},
{
"uuid": "9523661dc60c46e9881dbf008caff913",
"name": "locfile",
"isFile": true,
"size": 0,
"lmdt": 1688810622177,
"path": "locfile", // Correct
"extension": "",
"tags": []
},
{
"uuid": "63f43a6a66da4e5aabab7f6a8a12910d",
"name": "dirfile",
"isFile": true,
"size": 0,
"lmdt": 1688810622177,
"path": "test/loc/dir/dirfile", // Wrong, expected "dir/dirfile"
"extension": "",
"tags": []
}
]
Hi. There's an issue with the paths written in an index by
tscmd -m indexer: instead of being relative to the location, the path is relative to the first directory in each file's absolute path (e.g./home/,/media/, etc.).This does not affect files directly under the location (
$location/*).This happens with both v2.1.53 and v3.0.2, using node.js v16.20.1.