Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/syncHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SyncHandler implements Disposable {
try {
const uris = await this.getWatchingUris();
for (const uri of uris) {
const normalizedPath: string = uri.fsPath;
const normalizedPath: string = uri.fsPath?.replace(/[\\\/]+$/, ""); // remove trailing slashes
const pattern: RelativePattern = new RelativePattern(normalizedPath, "**/*");
const watcher: FileSystemWatcher = workspace.createFileSystemWatcher(pattern);
this.disposables.push(watcher);
Expand Down
2 changes: 1 addition & 1 deletion src/views/dependencyDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class DependencyDataProvider implements TreeDataProvider<ExplorerNode> {
window.showErrorMessage("The URI of the project is not available, you can try to trigger the command 'Java: Reload Project' from Command Palette.");
return;
}
const pattern: RelativePattern = new RelativePattern(Uri.parse(node.uri).fsPath, "{pom.xml,*.gradle}");
const pattern: RelativePattern = new RelativePattern(Uri.parse(node.uri).fsPath?.replace(/[\\\/]+$/, ""), "{pom.xml,*.gradle}");
const uris: Uri[] = await workspace.findFiles(pattern, null /*exclude*/, 1 /*maxResults*/);
if (uris.length >= 1) {
commands.executeCommand(Commands.JAVA_PROJECT_CONFIGURATION_UPDATE, uris[0]);
Expand Down