| Index: third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| index ae00a5abfad8d07ae6250346cdfd53878c0ee139..3fa0c3e44b06c41e5d9c7284f0fa26bb8604a5c2 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| @@ -66,7 +66,7 @@ WebInspector.FileSystemWorkspaceBinding._lastRequestId = 0;
|
| */
|
| WebInspector.FileSystemWorkspaceBinding.projectId = function(fileSystemPath)
|
| {
|
| - return "filesystem:" + fileSystemPath;
|
| + return "file://" + fileSystemPath;
|
| }
|
|
|
| /**
|
| @@ -136,9 +136,7 @@ WebInspector.FileSystemWorkspaceBinding.prototype = {
|
| */
|
| fileSystemPath: function(projectId)
|
| {
|
| - var fileSystemPath = projectId.substr("filesystem:".length);
|
| - var normalizedPath = WebInspector.IsolatedFileSystem.normalizePath(fileSystemPath);
|
| - return projectId.substr("filesystem:".length);
|
| + return projectId.substr("file://".length);
|
| },
|
|
|
| /**
|
| @@ -260,15 +258,15 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem = function(fileSystemWorkspac
|
| this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
|
| this._fileSystem = isolatedFileSystem;
|
| this._fileSystemBaseURL = "file://" + this._fileSystem.normalizedPath() + "/";
|
| + this._fileSystemPath = this._fileSystem.path();
|
|
|
| - var id = WebInspector.FileSystemWorkspaceBinding.projectId(this._fileSystem.path());
|
| + var id = WebInspector.FileSystemWorkspaceBinding.projectId(this._fileSystemPath);
|
| console.assert(!workspace.project(id));
|
|
|
| - var url = "filesystem:" + this._fileSystem.normalizedPath();
|
| var normalizedPath = isolatedFileSystem.normalizedPath();
|
| var displayName = normalizedPath.substr(normalizedPath.lastIndexOf("/") + 1);
|
|
|
| - WebInspector.ProjectStore.call(this, workspace, id, WebInspector.projectTypes.FileSystem, url, displayName);
|
| + WebInspector.ProjectStore.call(this, workspace, id, WebInspector.projectTypes.FileSystem, displayName);
|
|
|
| workspace.addProject(this);
|
| this.populate();
|
| @@ -280,7 +278,7 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
|
| */
|
| fileSystemPath: function()
|
| {
|
| - return this._fileSystem.path();
|
| + return this._fileSystemPath;
|
| },
|
|
|
| /**
|
| @@ -289,7 +287,7 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
|
| */
|
| _filePathForUISourceCode: function(uiSourceCode)
|
| {
|
| - return "/" + uiSourceCode.path();
|
| + return uiSourceCode.path().substring(("file:// " + this._fileSystemPath).length);
|
| },
|
|
|
| /**
|
| @@ -609,14 +607,10 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
|
| if (!filePath)
|
| console.assert(false);
|
|
|
| - var slash = filePath.lastIndexOf("/");
|
| - var parentPath = filePath.substring(0, slash);
|
| - var name = filePath.substring(slash + 1);
|
| -
|
| - var extension = this._extensionForPath(name);
|
| + var extension = this._extensionForPath(filePath);
|
| var contentType = WebInspector.FileSystemWorkspaceBinding._contentTypeForExtension(extension);
|
|
|
| - var uiSourceCode = this.createUISourceCode(parentPath, name, this._fileSystemBaseURL + filePath, contentType);
|
| + var uiSourceCode = this.createUISourceCode(this._fileSystemBaseURL + filePath, contentType);
|
| this.addUISourceCode(uiSourceCode);
|
| return uiSourceCode;
|
| },
|
|
|