Don't produce errors for duplicate files if they are for tensorflow

pull/377/head^2
Gordon Williams 2020-05-04 09:32:50 +01:00
parent d206ff07c7
commit 7c870a304f
1 changed files with 3 additions and 0 deletions

View File

@ -56,6 +56,7 @@ const APP_KEYS = [
const STORAGE_KEYS = ['name', 'url', 'content', 'evaluate'];
const DATA_KEYS = ['name', 'wildcard', 'storageFile'];
const FORBIDDEN_FILE_NAME_CHARS = /[,;]/; // used as separators in appid.info
const VALID_DUPLICATES = [ '.tfmodel', '.tfnames' ];
function globToRegex(pattern) {
const ESCAPE = '.*+-?^${}()|[]\\';
@ -206,6 +207,8 @@ apps.forEach((app,appIdx) => {
// Do not allow files from different apps to collide
let fileA
while(fileA=allFiles.pop()) {
if (VALID_DUPLICATES.includes(fileA.file))
return;
const nameA = (fileA.file||fileA.data),
globA = globToRegex(nameA),
typeA = fileA.file?'storage':'data'