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

Windows changes for File IO, File dialog and getElapsedMilliseconds. #2

Merged
merged 5 commits into from
Jun 14, 2012

Conversation

RaymondLim
Copy link
Contributor

No description provided.

#include <sys/stat.h>

// The global ClientHandler reference.
extern CefRefPtr<ClientHandler> g_handler;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this accidently checked in. I need this for QuitApplication().


// Forward declarations for functions at the bottom of this file
void FixFilename(ExtensionString& filename);
void EscapeJSONString(const std::wstring& str, std::wstring& finalResult);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This declaration can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops... I missed that in cleanup.

@ghost ghost assigned gruehle Jun 14, 2012
Rename FixFilename to ConvertToNativePath.
Add a new function ConvertToUnixPath for converting all selected files to unix path before returning them to JS layer.
Remove all calls to FixFilename since we're now using unix path and Windows file IO can handle unix path. Not sure we may still need it for  Win XP.
Append a '/' to the end of a directory before calling _wstat().
@gruehle
Copy link
Member

gruehle commented Jun 14, 2012

Looks good! Merging.

gruehle added a commit that referenced this pull request Jun 14, 2012
Windows changes for File IO, File dialog and getElapsedMilliseconds.
@gruehle gruehle merged commit c8ec324 into master Jun 14, 2012
radorodopski added a commit to radorodopski/brackets-shell that referenced this pull request Oct 24, 2014
This commit fixes a couple of things:
    1. The list of icons was using relative paths.
    2. If the icons could not be loaded, the error was ignored without a warning.

For adobe#1 I am prefixing the icon paths with the directory where the Brackets executable resides (since the icons are there, too).
One might think that the paths are relative to the aforementioned directory, except that is only true if Brackets is started from the launcher. If I start Brackets from the command line (or if I specify another initial working dir), Brackets fails to load the icons.
On top of that, no warning is issued to the user, making this hard to trace as my window manager cached the icons (so for testing I had to rename the executable, too). Which leads me to adobe#2, now I'm issuing a warning if Brackets fails to load any of the icons.
The bug was originally pointed out to me by another user - @orschiro on github.
gruehle added a commit that referenced this pull request Dec 8, 2015
Windows changes for File IO, File dialog and getElapsedMilliseconds.
@pratts pratts mentioned this pull request Aug 6, 2017
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants