Clean query paramters from ext name
This commit is contained in:
parent
549404bbee
commit
66f8cd1f65
2 changed files with 9 additions and 2 deletions
|
@ -607,7 +607,11 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
|
|||
const resource = EditorResourceAccessor.getOriginalUri(editor);
|
||||
const path = resource ? resource.scheme === Schemas.file ? resource.fsPath : resource.path : undefined;
|
||||
if (resource && path) {
|
||||
descriptor['resource'] = { mimeType: guessMimeTypes(resource).join(', '), scheme: resource.scheme, ext: extname(resource), path: hash(path) };
|
||||
let resourceExt = extname(resource);
|
||||
// Remove query paramaters from the resource extension
|
||||
const queryStringLocation = resourceExt.indexOf('?');
|
||||
resourceExt = queryStringLocation !== -1 ? resourceExt.substr(0, queryStringLocation) : resourceExt;
|
||||
descriptor['resource'] = { mimeType: guessMimeTypes(resource).join(', '), scheme: resource.scheme, ext: resourceExt, path: hash(path) };
|
||||
|
||||
/* __GDPR__FRAGMENT__
|
||||
"EditorTelemetryDescriptor" : {
|
||||
|
|
|
@ -194,7 +194,10 @@ export class TelemetryContribution extends Disposable implements IWorkbenchContr
|
|||
}
|
||||
|
||||
private getTelemetryData(resource: URI, reason?: number): TelemetryData {
|
||||
const ext = extname(resource);
|
||||
let ext = extname(resource);
|
||||
// Remove query paramaters from the resource extension
|
||||
const queryStringLocation = ext.indexOf('?');
|
||||
ext = queryStringLocation !== -1 ? ext.substr(0, queryStringLocation) : ext;
|
||||
const fileName = basename(resource);
|
||||
const path = resource.scheme === Schemas.file ? resource.fsPath : resource.path;
|
||||
const telemetryData = {
|
||||
|
|
Loading…
Reference in a new issue