View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021687 | MMW 5 | General | public | 2025-07-07 19:58 | 2025-07-08 11:36 |
Reporter | zvezdan | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Target Version | 2024.2 | Fixed in Version | 2024.2 | ||
Summary | 0021687: getFolderOfPathAsync resolves with wrong drive/folder | ||||
Description | 1. Let say that I have database containing only C: and D: in the Medias table. If I specify a root of some non-existent drive, e.g. X:\, I will get the folder object with the idMedia of the last drive from the Medias table and the id/persistentID of the corresponding root folder of that drive from the Folders table. I will get the same result for e.g. X:\jkfhdsfjk (a random string as filename). If I specify a wrong path with a folder, e.g. X:\rlshjkdfjkdh\ (a random string as folder), I will get 0 for id and persistentID, but idMedia will be as in the previous case. I expect in such situations getFolderOfPathAsync to reject, or to resolve with undefined, or, at least, not to returns idMedia/persistentID with the incorrect data, but 0. 2. Let say that I have database containing only C: drive in the Medias table having old serial number, i.e. it is inaccessible (although I have a new C: drive with another serial number). If I use app.filesystem.getFolderOfPathAsync("c:\\"), it will resolve with id and persistentID = 0 and idMedia = -1. I expect to get the idMedia of the old C: drive and id/persistentID with the corresponding id from the Folders table in database. As you already know, the object returned by getFolderOfPathAsync() has objectType: "dbfolder", not "folder". I think getFolderFromString() is for that another case (your API is not very informative about it). | ||||
Steps To Reproduce | You could try it in Console: await app.filesystem.getFolderOfPathAsync("x:\\") | ||||
Tags | No tags attached. | ||||
Fixed in build | 3163 | ||||