Wrong Path? (was Bug? Not sure)
Posted: Mon Jul 14, 2025 5:04 pm
I'm not sure if this is a Purebasic bug, Linux bug or Russ bug but here's the problem:
I have a program that I wrote in windows. When I made the desktop shortcut the "Start In" is "C:\PureBasic Projects\InfoPad" and the
"Target" is "C:\PureBasic Projects\InfoPad\InfoPad64.exe". In the code I have a line Global db$ = GetCurrentDirectory() + "InfoPad.db3"
Everything works as I expected and if I look at db$ it is "C:\PureBasic Projects\InfoPad\InfoPad.db3". So far, so good.
When I compile and run in Raspberry Pi Linux, all works well when the program is started (now called "InfoPad") in "/home/rsrole/Private/Purebasic Projects/InfoPad"
but when started from the launcher, the GetCurrentDirectory() points to "/home/rsrole/InfoPad.db3"
Here' the InfoPad.desktop file:
[Desktop Entry]
Type=Application
Comment=InfoPad
Name=InfoPad
Path="/home/rsrole/Private/Purebasic Projects/InfoPad"
Exec="/home/rsrole/Private/Purebasic Projects/InfoPad/InfoPad"
Terminal=false
#gnome-panel-launcher
Type=Application
NoDisplay=false
StartupNotify=true
Did I make the launcher incorrectly? Or is this a bug?
// Moved from "Bugs - Linux" to "Linux" (Kiffi)
I have a program that I wrote in windows. When I made the desktop shortcut the "Start In" is "C:\PureBasic Projects\InfoPad" and the
"Target" is "C:\PureBasic Projects\InfoPad\InfoPad64.exe". In the code I have a line Global db$ = GetCurrentDirectory() + "InfoPad.db3"
Everything works as I expected and if I look at db$ it is "C:\PureBasic Projects\InfoPad\InfoPad.db3". So far, so good.
When I compile and run in Raspberry Pi Linux, all works well when the program is started (now called "InfoPad") in "/home/rsrole/Private/Purebasic Projects/InfoPad"
but when started from the launcher, the GetCurrentDirectory() points to "/home/rsrole/InfoPad.db3"
Here' the InfoPad.desktop file:
[Desktop Entry]
Type=Application
Comment=InfoPad
Name=InfoPad
Path="/home/rsrole/Private/Purebasic Projects/InfoPad"
Exec="/home/rsrole/Private/Purebasic Projects/InfoPad/InfoPad"
Terminal=false
#gnome-panel-launcher
Type=Application
NoDisplay=false
StartupNotify=true
Did I make the launcher incorrectly? Or is this a bug?
// Moved from "Bugs - Linux" to "Linux" (Kiffi)