1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

retouching filder ignoring

This commit is contained in:
Patrik J. Braun 2019-12-07 18:26:29 +01:00
parent b47d0ea675
commit a952d927b6
2 changed files with 13 additions and 13 deletions

View File

@ -65,20 +65,20 @@ export class DiskMangerWorker {
const exclude = Config.Server.indexing.excludeFolderList[j];
if (exclude.startsWith('/')) {
if (exclude==absoluteName) {
if (exclude === absoluteName) {
return true;
}
} else if (exclude.includes('/')) {
if (path.normalize(exclude)==relativeName) {
if (path.normalize(exclude) === relativeName) {
return true;
}
} else {
if (exclude==name) {
if (exclude === name) {
return true;
}
}
}
// exclude dirs that have the given files (like .ignore)
for (let j = 0; j < Config.Server.indexing.excludeFileList.length; j++) {
const exclude = Config.Server.indexing.excludeFileList[j];

View File

@ -67,12 +67,12 @@
<div class="form-group row">
<label class="col-md-2 control-label" for="excludeFileList" i18n>Exclude File List</label>
<div class="col-md-10">
<input type="text" class="form-control" placeholder=""
<input type="text" class="form-control" placeholder=".ignore; .pg2ignore"
id="excludeFileList"
[(ngModel)]="excludeFileList"
name="excludeFileList" required>
<small class="form-text text-muted">
<ng-container i18n>FFiles that mark a folder to be excluded from indexing</ng-container><br/>
<ng-container i18n>Files that mark a folder to be excluded from indexing</ng-container><br/>
<ng-container
i18n>';' separated strings. Any folder that contains a file with this name will be excluded from indexing.</ng-container>
</small>