flamendless / Slab

An immediate mode GUI for the Love2D framework.
MIT License
294 stars 25 forks source link

Fix file unable to be opened in "Open File" dialog on Windows, and miscellaneous related behaviours change #26

Closed Rinkaa closed 3 years ago

Rinkaa commented 4 years ago

Tested using main.lua on Windows 10 and Android.

Files were regarded as folders to be expanded when OK button pressed, therefore could not be opened in "Open File" dialog on Windows. ( #22 )
Fixed by rewriting FileSystem.Exists(...) (e045c3b) , but there are some new issues coming up after this change:

(Edited on Jun 10) All three types of dialogs should be working fine now. Summary of the changes:

Rinkaa commented 4 years ago

I am still thinking about the logic on the whole... Is it still a good idea to keep FileSystem.IsDirectory(...) like this?

function FileSystem.IsDirectory(Path)
    return FileSystem.Exists(Path .. FileSystem.Separator())
end

What if there is a folder having same name as a file in the same directory? Some popular OS allow this after all...

flamendless commented 3 years ago

Hi @Rinkaa what's the status on this? Can you confirm that this is fixed for Windows? I would test this PR if this dont break in Linux and then merge it if everything is ok

Rinkaa commented 3 years ago

Hi @Rinkaa what's the status on this? Can you confirm that this is fixed for Windows? I would test this PR if this dont break in Linux and then merge it if everything is ok

Thank you for the ping! I totally forgot this PR ^_^;; sorry

the status

This PR is no longer effective now. It was meant for fixing #22 and nothing more actually. Should be closed back when #22 was closed by some other solution using FFI. Will close now.