You are reading a single comment by @feugy and its replies. Click here to read the full conversation.
  • Hi there!

    Before opening a bug on the tracker, I wanted to double check this behaviour.
    This code opens a file in append mode, and writes some text in it.

    const Storage = require('Storage')
    const name = 'test'
    Storage.erase(name)
    const file = Storage.open(name, 'a')
    console.log('-> files', Storage.list())
    // file not in the list
    file.write('whatever')
    console.log('-> files', Storage.list())
    // file exists, but has a \1 octal escape sequence appended to its name
    

    this gives:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    >-> files [
      "+mclock",
      "-mclock",
      "*mclock",
      "+setting",
      "-setting",
      "=setting",
      "*setting",
      "+sbt",
      "=sbt",
      "+sbat",
      "=sbat",
      "+files",
      "-files",
      "*files",
      ".trishig",
      ".bootcde",
      "@setting",
     ]
    -> files [
      "+mclock",
      "-mclock",
      "*mclock",
      "+setting",
      "-setting",
      "=setting",
      "*setting",
      "+sbt",
      "=sbt",
      "+sbat",
      "=sbat",
      "+files",
      "-files",
      "*files",
      ".trishig",
      ".bootcde",
      "@setting",
      "test\1"
     ]
    

    This \1 at the end: is it expected?

About

Avatar for feugy @feugy started