Closed djjd47130 closed 4 months ago
Loading, Managing, and Saving libraries is done. Next is to integrate it into the scripts, and change ALL paths in script to require relative paths via library names.
For example, a library named "Movies" at path "D:\Media\Movies\". In the script, you will not be permitted to access files via "D:\Media\Movies..." - instead, you must use "Movies...".
HUGE PROGRESS converting the script over to use relative library paths. Just buttoning things up, and will commit soon.
Things took a toll for the worse - I'm battling strange behavior where half the time it tries to use an absolute path anyway, then fails because it doesn't include the library name prefix. Then the fact that I inadvertently discovered a back door that allowed me to browse files way outside my libraries and search criteria...
Finally figured out the problem - apparently TPath.Combine
is very sensitive, and doesn't work as expected. For example, TPath.Combine('Media', '\Test\File.abc');
SHOULD output 'Media\Test\File.abc'
but instead outputs '\Test\File.abc'
.
Therefore, TPath.Combine
cannot be trusted, and concatenating paths should be done manually, or otherwise by other means.
Goal
Allow user to create and manage different libraries, and further restrict the scripting language to ONLY access data in these libraries.
For example, a library named "Movies" at path "D:\Media\Movies". In the script, you will not be permitted to access files via "D:\Media\Movies..." - instead, you must use "Movies...".
Requirements