       try
         item.saveAs(newItemPath)
       catch error
-        @handleSaveError(error)
+        @handleSaveError(error, item)
       nextAction?()
 
   # Public: Save all items.

      return false unless @promptToSaveItem(item)
    true

  handleSaveError: (error) ->
    if error.code is 'EISDIR' or error.message?.endsWith?('is a directory')
      atom.notifications.addWarning("Unable to save file: #{error.message}")
    else if error.code is 'EACCES' and error.path?
      atom.notifications.addWarning("Unable to save file: Permission denied '#{error.path}'")
    else if error.code in ['EPERM', 'EBUSY', 'UNKNOWN', 'EEXIST'] and error.path?
      atom.notifications.addWarning("Unable to save file '#{error.path}'", detail: error.message)
    else if error.code is 'EROFS' and error.path?
      atom.notifications.addWarning("Unable to save file: Read-only file system '#{error.path}'")
    else if error.code is 'ENOSPC' and error.path?
      atom.notifications.addWarning("Unable to save file: No space left on device '#{error.path}'")
    else if error.code is 'ENXIO' and error.path?
      atom.notifications.addWarning("Unable to save file: No such device or address '#{error.path}'")
    else if errorMatch = /ENOTDIR, not a directory '([^']+)'/.exec(error.message)
      fileName = errorMatch[1]
      atom.notifications.addWarning("Unable to save file: A directory in the path '#{fileName}' could not be written to")

      try
        item.save?()
      catch error
        @handleSaveError(error, item)
      nextAction?()
    else
      @saveItemAs(item, nextAction)
