Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js

Issue 2697403003: DevTools: "Delete File" in navigator should actually delete a file (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
index fec928ab97abeb60429ceea063a348dcfe7358be..091eaeb166934bb694c4311f634885e8c185e848 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
@@ -545,7 +545,11 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
* @param {string} path
*/
deleteFile(path) {
dgozman 2017/02/17 01:13:12 Let's pass the UISourceCode here instead.
lushnikov 2017/02/17 01:57:47 Done.
- this._fileSystem.deleteFile(path);
+ var uiSourceCode = this.uiSourceCodeForURL(path);
+ if (!uiSourceCode)
+ return;
+ var relativePath = Persistence.FileSystemWorkspaceBinding.relativePath(uiSourceCode).join('/');
dgozman 2017/02/17 01:13:12 this._filePathForUISourceCode
lushnikov 2017/02/17 01:57:47 Done.
+ this._fileSystem.deleteFile(relativePath);
this.removeUISourceCode(path);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698