Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Issue 1508 #1926

Merged
merged 3 commits into from
Oct 25, 2012
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions src/extensions/default/RecentProjects/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ define(function (require, exports, module) {
lastSlash = path.slice(0, path.length - 1).lastIndexOf("/");
}
if (lastSlash >= 0) {
rest = path.slice(0, lastSlash);
rest = " - " + path.slice(0, lastSlash);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to change it to rest = " - " + (lastSlash ? path.slice(0, lastSlash) : "/");

Otherwise, you won't see the slash after a project name that is using one of the root folders in your Mac Volumes. ie. the original issue is not fixed yet, but the other issue of having the mac volume as your project folder is fixed.

folder = path.slice(lastSlash + 1);
} else {
rest = "";
rest = "/";
folder = path;
}

var folderSpan = $("<span></span>").addClass("recent-folder").text(folder),
restSpan = $("<span></span>").addClass("recent-folder-path").text(" - " + rest);
restSpan = $("<span></span>").addClass("recent-folder-path").text(rest);
return $("<a></a>").addClass("recent-folder-link").append(folderSpan).append(restSpan).data("path", path);
}

Expand Down
11 changes: 9 additions & 2 deletions src/project/SidebarView.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,15 @@ define(function (require, exports, module) {
* Update project title when the project root changes
*/
function _updateProjectTitle() {
$projectTitle.html(ProjectManager.getProjectRoot().name);
$projectTitle.attr("title", ProjectManager.getProjectRoot().fullPath);
var displayName = ProjectManager.getProjectRoot().name;
var fullPath = ProjectManager.getProjectRoot().fullPath;

if (displayName === "" && fullPath === "/") {
displayName = "/";
}

$projectTitle.html(displayName);
$projectTitle.attr("title", fullPath);
}

/**
Expand Down