View Single Post
  #1  
Old 12.01.2019, 08:16
Luke M Luke M is offline
Wind Gust
 
Join Date: May 2012
Posts: 44
Default Archive (HJ_SPLIT) required file count reduced by plugin rename

When a plugin renames a file, this can cause the archive (HJ_SPLIT) required file count to be reduced from (for example) 3 to 2. This causes extraction to mysteriously fail.

Example: with solidfiles.com, spaces are replaced by underscores. So "test 1.zip.001" becomes "test_1.zip.001" when the download starts. If all parts are downloaded at the same time, there's no problem. The problem occurs when only the first two parts are started.

My workaround is to pre-rename the files:
Code:
// Description: Replaces spaces with underscores in filenames
// Event Trigger: Packagizer Hook

if (/.*solidfiles\.com.*/.test(link.getURL())) {
    link.setName(link.name.replace(/ /g, "_"));
}

Last edited by Luke M; 12.01.2019 at 10:05.
Reply With Quote