mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Update getLongTitle to fall back to basename
Update getLongTitle to fall back to basename when the relative path resolves to a blank string.
This commit is contained in:
@@ -260,6 +260,7 @@ class Editor extends Model
|
||||
if sessionPath = @getPath()
|
||||
fileName = path.basename(sessionPath)
|
||||
directory = atom.project.relativize(path.dirname(sessionPath))
|
||||
directory = if directory.length > 0 then directory else path.basename(path.dirname(sessionPath))
|
||||
"#{fileName} - #{directory}"
|
||||
else
|
||||
'untitled'
|
||||
|
||||
Reference in New Issue
Block a user