Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] [Linux] showOpenDialog initialPath doesn't work #9123

Open
core-ai-bot opened this issue Aug 30, 2021 · 13 comments
Open

[CLOSED] [Linux] showOpenDialog initialPath doesn't work #9123

core-ai-bot opened this issue Aug 30, 2021 · 13 comments

Comments

@core-ai-bot
Copy link
Member

Issue by Wikunia
Thursday Jan 01, 2015 at 21:59 GMT
Originally opened as adobe/brackets#10297


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

@core-ai-bot
Copy link
Member Author

Comment by sbruchmann
Thursday Jan 01, 2015 at 22:27 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by Wikunia
Thursday Jan 01, 2015 at 22:37 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by sbruchmann
Thursday Jan 01, 2015 at 22:39 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by Wikunia
Thursday Jan 01, 2015 at 22:43 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by sbruchmann
Thursday Jan 01, 2015 at 23:05 GMT


Works on my machine™

My setup:

  • OS X 10.9.5
  • Brackets Release 1.2 development build 1.2.0-15578 (master da48369fb)
    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);
});

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Friday Jan 02, 2015 at 01:30 GMT


Windows 8.1
Brackets@ latest master
Release 1.1 Brackets Shell

@core-ai-bot
Copy link
Member Author

Comment by sbruchmann
Friday Jan 02, 2015 at 01:31 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by Wikunia
Friday Jan 02, 2015 at 16:07 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday Jan 28, 2015 at 01:20 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by nethip
Wednesday Feb 04, 2015 at 08:57 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by Wikunia
Wednesday Feb 04, 2015 at 11:07 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by nethip
Wednesday Feb 04, 2015 at 11:18 GMT


@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

@core-ai-bot
Copy link
Member Author

Comment by nethip
Thursday Feb 05, 2015 at 10:58 GMT


@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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant