Skip to content

Commit 1902090

Browse files
committed
🐛 properly fetch the pathToSync setting
should fix #127, and save a cat...
1 parent 9190952 commit 1902090

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/scm/Model.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,9 @@ export class Model implements Disposable {
464464
}
465465

466466
private async syncUpdate(): Promise<void> {
467-
//const config: IPerforceConfig = PerforceService.getConfig();
468-
const config = this._config;
469-
const pathToSync = config.p4Dir ? config.p4Dir + '...' : null;
470-
471-
await Utils.runCommand(this._workspaceUri, 'sync', Uri.parse(pathToSync), null, '-q').then(output => {
467+
const p4Dir = vscode.workspace.getConfiguration('perforce', this._workspaceUri).get('dir');
468+
const pathToSync = p4Dir ? vscode.Uri.file(p4Dir + '...') : null;
469+
Utils.runCommand(this._workspaceUri, 'sync', pathToSync, null, '').then(output => {
472470
Display.channel.append(output);
473471
this.Refresh();
474472
}).catch(reason => {

0 commit comments

Comments
 (0)