mirror of
https://github.com/Rafostar/clapper.git
synced 2025-09-01 00:41:58 +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)
|
function saveFilePromise(place, subdirName, fileName, data)
|
||||||
{
|
{
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
let destPath = GLib[`get_${place}_dir`]() + '/' + Misc.appId;
|
let folderPath = GLib[`get_${place}_dir`]() + '/' + Misc.appId;
|
||||||
|
|
||||||
if(subdirName)
|
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}`);
|
debug(`saving file: ${destPath}`);
|
||||||
|
|
||||||
const checkFolders = (subdirName)
|
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) => {
|
return new Promise((resolve, reject) => {
|
||||||
const destPath = [
|
let destPath = GLib[`get_${place}_dir`]() + '/' + Misc.appId;
|
||||||
GLib[`get_${place}_dir`](),
|
|
||||||
Misc.appId,
|
if(subdirName)
|
||||||
folderName,
|
destPath += `/${subdirName}`;
|
||||||
fileName
|
|
||||||
].join('/');
|
destPath += `/${fileName}`;
|
||||||
|
|
||||||
const file = Gio.File.new_for_path(destPath);
|
const file = Gio.File.new_for_path(destPath);
|
||||||
debug(`reading data from: ${destPath}`);
|
debug(`reading data from: ${destPath}`);
|
||||||
|
Reference in New Issue
Block a user