Release 0.4 – Part 1

Sleep deprived as exams are approaching. I hate this feeling. Here I am, spending time studying instead of enjoying my bed. What can I do to ease my mind? I might be odd, but I find that coding is relaxing to me. As mentioned before, I love breaking and fixing stuff. The bug I chose (mozilla/thimble.mozilla.org#1887) doesn’t involve breaking, but it involves fixing!  So let’s get started.

Fixing issue #1887

As mentioned by @pomax, if the user imports and existing file/folder, the conflicting item will be overwritten without notifying the user. The code for importing file/folder lies here.

As you can see, there are 3 functions I’ve selected. handleRegularFile(), handleZipFile(), handleTarFile(). The function names are obvious (this is good programming). This is where I need to debug and study whats happening.

If you want to see all my changes, please take a look at my Pull Request.

Here’s the jist of what I’m doing in all 3 functions:

If the file exists, a Dialog will appear asking for the users input, else the item will be imported.

Unfortuntely, my code will be changed once this cool new feature is implemented to Thimble. Once that PR lands, I’ll make a part 2 detailing my steps into implementing my changes. Hopefully this PR lands soon 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *