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

WIN32: use FolderItem ShellPath #4

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions sources/CubeSQLPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1810,21 +1810,14 @@ REALstring CheckFixEscapedStringPath (REALstring s) {
}

REALstring REALbasicPathFromFolderItem (REALfolderItem value) {
REALstring path = NULL;
DEBUG_WRITE("REALbasicPathFromFolderItem");

double v = REALGetRBVersion();
if (v <= 2012.021) { // 2012R2.1 is the latest Real Studio edition
#if WIN32
if (REALGetPropValueString((REALobject)value, "AbsolutePath", &path) == false) return NULL;
#else
if (REALGetPropValueString((REALobject)value, "ShellPath", &path) == false) return NULL;
path = CheckFixEscapedStringPath(path);
#endif
} else {
// NativePath property is supported only on Xojo and it is the recommended way to get path from FolderItem
if (REALGetPropValueString((REALobject)value, "NativePath", &path) == false) return NULL;
}
REALstring path = NULL;

#if WIN32
if (REALGetPropValueString((REALobject)value, "ShellPath", &path) == false) return NULL;
#else
if (REALGetPropValueString((REALobject)value, "NativePath", &path) == false) return NULL;
#endif

REALLockString(path);
return path;
Expand Down
2 changes: 1 addition & 1 deletion sources/CubeSQLPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#define PING_FREQUENCY 300 // on the server it is specified as 300
#define DEBUG_WRITE(...) if (debugFile != NULL) debug_write(__VA_ARGS__)
#define PLUGIN_VERSION "3.2.1"
#define PLUGIN_VERSION "3.2.2"
#define SSL_NOVERSION "N/A"
#define MAX_TYPES_COUNT 512

Expand Down