George Klimov created ZEPPELIN-4011:
---------------------------------------

             Summary: Fix Note#setName
                 Key: ZEPPELIN-4011
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-4011
             Project: Zeppelin
          Issue Type: Bug
            Reporter: George Klimov
            Assignee: George Klimov
         Attachments: notepath.gif

Now note may move to the root directory after enabling cron in it. It caused by 
{{Note#setName}}
{code:java}
  public void setName(String name) {
    this.name = name;
    if (this.path == null) {
      if (name.startsWith("/")) {
        this.path = name;
      } else {
        this.path = "/" + name;
      }
    } else {
      int pos = this.path.indexOf("/");
      this.path = this.path.substring(0, pos + 1) + this.name;
    }
  }
{code}
{{int pos = this.path.indexOf("/");}} should be replaced with 
{{this.path.lastIndexOf("/")}}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to