From efdd2ea56971f3b74d4dff543dc168581c1cb4cb Mon Sep 17 00:00:00 2001 From: cbartondock Date: Sat, 20 Jun 2020 13:51:04 -0400 Subject: [PATCH] solidify fix --- CHANGELOG.md | 3 +++ src/renderer/components/ng-path-input.component.ts | 2 +- src/renderer/components/ng-text-input.component.ts | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7463d056e1..509beea0ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## 2.3.3 +* Unbork browse for files + ## 2.3.2 ### Fixed * Filter by category also removing titles in all artwork view diff --git a/src/renderer/components/ng-path-input.component.ts b/src/renderer/components/ng-path-input.component.ts index fe2f38dee8..18de65fe44 100644 --- a/src/renderer/components/ng-path-input.component.ts +++ b/src/renderer/components/ng-path-input.component.ts @@ -45,7 +45,7 @@ export class NgPathInputComponent implements ControlValueAccessor { buttonLabel:buttonLabel } as Electron.OpenDialogOptions).then((result: any)=>{ if(result && !result.canceled && result.filePaths && result.filePaths.length==1){ - this.writeValue('_browse_&'.concat(result.filePaths[0])); + this.writeValue('_browse_&:&'.concat(result.filePaths[0])); } }) } diff --git a/src/renderer/components/ng-text-input.component.ts b/src/renderer/components/ng-text-input.component.ts index d02fa9d429..0f6c9fecb4 100644 --- a/src/renderer/components/ng-text-input.component.ts +++ b/src/renderer/components/ng-text-input.component.ts @@ -187,8 +187,8 @@ export class NgTextInputComponent implements ControlValueAccessor { writeValue(value: string, updateDom: boolean = true, selection?: { start: number, end: number }): void { let previousValue = this.currentValue; if (value !== this.currentValue) { - if(value&&value.split('&')[0]=='_browse_'){ - value = this.appendGlob? path.resolve(value.split('&')[1],path.basename(this.currentValue)||this.appendGlob).replace(/\\/g,'/'):value.split('&')[1]; + if(value&&value.split('&:&')[0]=='_browse_'){ + value = this.appendGlob? path.resolve(value.split('&:&')[1],path.basename(this.currentValue)||this.appendGlob).replace(/\\/g,'/'):value.split('&:&')[1]; } this.currentValue = value; if (updateDom || this.highlight)