mirror of
https://github.com/atom/atom.git
synced 2026-02-11 07:05:11 -05:00
fs.directory returns empty string if path has no parent directory
This commit is contained in:
@@ -21,7 +21,9 @@ module.exports =
|
||||
# parent directory if the file is a directory. A terminal directory
|
||||
# separator is ignored.
|
||||
directory: (path) ->
|
||||
path.replace(new RegExp("/#{@base(path)}\/?$"), '')
|
||||
parentPath = path.replace(new RegExp("/#{@base(path)}\/?$"), '')
|
||||
return "" if path == parentPath
|
||||
parentPath
|
||||
|
||||
# Returns true if the file specified by path exists
|
||||
exists: (path) ->
|
||||
|
||||
Reference in New Issue
Block a user