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