Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[Linux] showOpenDialog initialPath doesn't work #10297

Closed
Wikunia opened this issue Jan 1, 2015 · 13 comments
Closed

[Linux] showOpenDialog initialPath doesn't work #10297

Wikunia opened this issue Jan 1, 2015 · 13 comments

Comments

@Wikunia
Copy link

Wikunia commented Jan 1, 2015

When I use initialPath inside showOpenDialog my File Manager shows me the recently used folders and when I use it in showSaveDialog everything works as I expect.
My initialPath variable is ProjectManager.getProjectRoot()._path
So this is working
FileSystem.showSaveDialog(title, initialPath, "",

this isn't
FileSystem.showOpenDialog(allowMultipleSelection, chooseDirectories, title, initialPath, fileTypes,

My machine:
Linux 3.17.6
Brackets 1.1.0

@sbruchmann
Copy link

Try using ProjectManager.getProjectRoot().fullPath instead of ProjectManager.getProjectRoot()._path.

@Wikunia
Copy link
Author

Wikunia commented Jan 1, 2015

@sbruchmann it shows the same path and doesn't work as well. And I think because it works with the save dialog it should work with the open dialog, too.

@sbruchmann
Copy link

Ah, I misread your issue. Sorry for the inconvenience.

@Wikunia
Copy link
Author

Wikunia commented Jan 1, 2015

Do you have the same problem? I will try it with Windows in the next days.

@sbruchmann
Copy link

Works on my machine™

My setup:

  • OS X 10.9.5
  • Brackets Release 1.2 development build 1.2.0-15578 (master da48369)
    build timestamp: Thu Jan 01 2015 23:47:59 GMT+0100
  • Brackets Shell d9b1cae

Tested with the following code sample:

define(function () {
    "use strict";

    var AppInit = brackets.getModule("utils/AppInit");
    var FileSystem = brackets.getModule("filesystem/FileSystem");
    var ProjectManager = brackets.getModule("project/ProjectManager");

    function main() {
        FileSystem.showOpenDialog(
            false,
            false,
            "Open a file",
            ProjectManager.getProjectRoot().fullPath,
            null
        );
    }

    AppInit.appReady(main);
});

@marcelgerber
Copy link
Contributor

Windows 8.1
Brackets @ latest master
Release 1.1 Brackets Shell

@sbruchmann
Copy link

So, it appears to be Linux only then, right?

@Wikunia
Copy link
Author

Wikunia commented Jan 2, 2015

Yes it is a Linux only problem! I've tested it on my Windows machine and everything works properly.

@Wikunia Wikunia changed the title showOpenDialog initialPath doesn't work [Linux] showOpenDialog initialPath doesn't work Jan 5, 2015
@peterflynn
Copy link
Member

Fixed in 1.2 -- see PR adobe/brackets-shell#496.

@nethip
Copy link
Contributor

nethip commented Feb 4, 2015

@Wikunia As the fix now in the master, could you verify if the PR has fixed the problem?

@Wikunia
Copy link
Author

Wikunia commented Feb 4, 2015

@nethip is this fix already in Brackets or onlu in brackets-shell? I updated my fork yesterday and it didn't work.

@nethip
Copy link
Contributor

nethip commented Feb 4, 2015

@Wikunia . This is a fix in brackets-shell. You need to rebuild brackets-shell on Linux. As master branch is not yet ready for Linux compilation please use jasonsanjose/cef_217_linux branch to build Brackets on Linux. Here is the wiki for building brackets on Linux.

https://github.com/adobe/brackets-shell/wiki/Building-Brackets-Shell

@nethip nethip assigned nethip and abose and unassigned nethip Feb 5, 2015
@nethip
Copy link
Contributor

nethip commented Feb 5, 2015

@Wikunia I checked if this is fixed or not and it is now fixed on Linux. The current Linux installer(posted at brackets.io) does not have this change. So when we post the next Linux installer, you can expect this issue to be fixed. Currently we are struggling with fixing the hang issues when quitting Brackets on Linux(after updating to latest version of chromium). All of the fixes relating to this are tracked at this PR. adobe/brackets-shell#499.

I am closing this issue. Feel free to open this, if you feel the fix is not proper. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants