Skip to content

Commit 10800f6

Browse files
committed
Modified arguments.debugger to show the current directory.
1 parent 444e17a commit 10800f6

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/arguments.debugger.console/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ int _tmain(int argc, _TCHAR* argv[])
2828

2929
// The string that appears in the application's title bar.
3030
tcout << _T("ShellAything Arguments Debugging Application\n");
31+
tcout << "\n";
32+
33+
// Get current directory
34+
TCHAR curdir[MAX_PATH] = { 0 };
35+
GetCurrentDirectory(MAX_PATH, curdir);
36+
tcout << _T("Current directory: ") << curdir << "\n";
3137

3238
tstring_t arguments_desc;
3339
ReadCommandLineArguments(arguments_desc);

src/arguments.debugger.window/gui.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,18 @@ int WINAPI WinMain(
4848
)
4949
#endif
5050
{
51-
ReadCommandLineArguments(window_text);
51+
// Get current directory
52+
TCHAR curdir[MAX_PATH] = { 0 };
53+
GetCurrentDirectory(MAX_PATH, curdir);
54+
window_text += _T("Current directory: ");
55+
window_text += curdir;
56+
window_text += _T("\r\n");
57+
58+
tstring_t args_text;
59+
ReadCommandLineArguments(args_text);
60+
61+
window_text += args_text;
62+
window_text += _T("\r\n");
5263

5364
WNDCLASSEX wcex;
5465

0 commit comments

Comments
 (0)