i created simple utilit and want add own application into snapstore, but i have a problem.
when running in normal mode (not snap package) everything works as it should work.
but when you start app after installing from snap, the following problem arises:
QFileInfo does not see the file I sent to it, although it exists and is in the home folder to which the application has access.
it looks like this:
endrii@Xenon:~/qt-deployer/bin$ cqtdeployer -bin qt-deployer verbose
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
realpath: '': No such file or directory # info.isFile() or QFileInfo info(bin)
"/home/endrii/snap/cqtdeployer/x4" #QDir::homePath()
"/home/endrii/qt-deployer/bin" #QDir("./").absolutePath())
"bin file is not file path: qt-deployer" #bin
run with $PWD
endrii@Xenon:~/qt-deployer/bin$ cqtdeployer -bin $PWD/qt-deployer verbose
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
"/home/endrii/snap/cqtdeployer/x4"
"/home/endrii/qt-deployer/bin"
"bin file is not file path: /home/endrii/qt-deployer/bin/qt-deployer"
the place where the existence of the file is called:
auto bin = QuasarAppUtils::getStrArg("bin");
QFileInfo info(bin);
if (!info.isFile()) {
verboseLog(QDir::homePath());
verboseLog(QDir("./").absolutePath());
verboseLog("bin file is not file path: " + bin);
return false;
}
source code of app
snapcraft.yaml
I really hope that someone will be able to help
why snap does not see the path to the file and the file itself?