https://bugs.kde.org/show_bug.cgi?id=513466

--- Comment #4 from Richard Kellnberger <[email protected]> ---
All this change did was change a 2 to a 3 and add a 0 to the end of each line?
This could been prevented with an if or two (just don't read the bits if its
version 2)? (Please still add this)
I got myself confused by the selected items and the item with the keyboard
fucus getting saved (only the selection gets restored for me), which is in many
cases the same item, making it appear twice.

I used this python script to port:
Takes the old file (you hopefully have backed up) and a location for the ported
file as args.
Please don't break your system.

```python
import sys
from pathlib import Path

if __name__ == "__main__":
    arglen = len(sys.argv)
    if arglen != 3:
        print("Wrong number arguments")
        exit(-1)
    input_ = Path(sys.argv[1])
    output = Path(sys.argv[2])
    if output.exists():
        print("Output exists")
        exit(-1)
    with open(input_, "rb") as i:
        with open(output, "wb") as o:
            for line in i.readlines():
                if line.startswith(b"Tab Data "):
                    stripped = line[:-1]
                    a, b = stripped.split(b"=\\x00\\x00\\x00\\x02")
                    o.write(a + b"=\\x00\\x00\\x00\\x03" + b +
b"\\x00\\x00\\x00\\x00\n")
                else:
                    o.write(line)
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to