+39

Add command line option to alter replace root path

Shawn 2 years ago • updated 3 weeks ago 3

One of the things that makes Ketarin less portable than it could be is that the complete download path is preserved in the data structure. If I use a USB stick as my local cache and more it to another device, if I don't match up the drive letter, a bunch of files might be re-downloaded or treated as missing.


One way around this is to find/replace the old path with the new path in an export/import operation, but it would be better if the paths were either not rooted (only partial paths) or if there were a way to replace the root path via the command line.


An example of the export code that demonstrates the problem is here:

...
<SourceType>FixedUrl</SourceType>
<PreviousLocation>K:\_Ketarin\Ketarin\..\Security\CertData-11 Oct 2016.txt</PreviousLocation>
<DeletePreviousFile>true</DeletePreviousFile>
...
<LastUpdated>2016-10-11T11:17:43.7694214-07:00</LastUpdated>
<TargetPath>..\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}</TargetPath>
<FixedDownloadUrl>{dl}</FixedDownloadUrl>
...


If I plug this drive into another computer that doesn't reflect it as "K:" I have to change the drive letter before I can have Ketarin run consistently.

When you request features, you should give it a vote though. At least one ;)

Isn't this already implemented?

No. The PreviousLocation is preserved as a complete path and only the file that exists at that path is compared with the previous version, if it's missing or that path doesn't exist it redownloads it even if the constructed path (including variables) exists.