gracelang / grace-web-editor

A simple editor for Grace
GNU General Public License v3.0
2 stars 8 forks source link

Uploaded file appears at top level, not in selected directory #50

Closed apblack closed 7 years ago

apblack commented 7 years ago

When a new file is created, it is always placed in the selected directory. However, when a file is uploaded, it always goes in the top-level directory.

This is inconsistent, at best. If a directory is selected, I expect new files, whether from upload or the file + button, to go there.

A related enhancement would be to be able to un-select a directory, so that new files are created at the top level.

Dmitri-2 commented 7 years ago

Fixed with commit 5f976b0. This is a bug that sounded complicated, but turned out to be somewhat easy to fix. The filename was being updated with the "current directory" identifier, so that it would be placed in the current "selected" directory. However, this name change wasn't being assigned to the correct place, hence resulting in files being placed at the top level. I apologize for this issue, as I likely broke this when updating the interface to use the newer alerts.