mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Fix file paths in debug messages
This commit is contained in:
@@ -56,12 +56,14 @@ function createDirPromise(dir)
|
||||
function saveFilePromise(place, subdirName, fileName, data)
|
||||
{
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let destPath = GLib[`get_${place}_dir`]() + '/' + Misc.appId;
|
||||
let folderPath = GLib[`get_${place}_dir`]() + '/' + Misc.appId;
|
||||
|
||||
if(subdirName)
|
||||
destPath += `/${subdirName}`;
|
||||
folderPath += `/${subdirName}`;
|
||||
|
||||
const destDir = Gio.File.new_for_path(folderPath);
|
||||
const destPath = folderPath + '/' + fileName;
|
||||
|
||||
const destDir = Gio.File.new_for_path(destPath);
|
||||
debug(`saving file: ${destPath}`);
|
||||
|
||||
const checkFolders = (subdirName)
|
||||
@@ -90,15 +92,15 @@ function saveFilePromise(place, subdirName, fileName, data)
|
||||
});
|
||||
}
|
||||
|
||||
function getFileContentsPromise(place, folderName, fileName)
|
||||
function getFileContentsPromise(place, subdirName, fileName)
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
const destPath = [
|
||||
GLib[`get_${place}_dir`](),
|
||||
Misc.appId,
|
||||
folderName,
|
||||
fileName
|
||||
].join('/');
|
||||
let destPath = GLib[`get_${place}_dir`]() + '/' + Misc.appId;
|
||||
|
||||
if(subdirName)
|
||||
destPath += `/${subdirName}`;
|
||||
|
||||
destPath += `/${fileName}`;
|
||||
|
||||
const file = Gio.File.new_for_path(destPath);
|
||||
debug(`reading data from: ${destPath}`);
|
||||
|
Reference in New Issue
Block a user