Skip to content

Commit

Permalink
fix #53
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Jun 8, 2023
1 parent 8ee990a commit b3419a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions widgets@aylur/pref/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class MediaPlayerPage extends SubPage {
_cacheSize() {
const dir = Gio.File.new_for_path(MEDIA_CACHE);
if (!GLib.file_test(MEDIA_CACHE, GLib.FileTest.EXISTS))
dir.make_directory(null);
dir.make_directory_with_parents(null);

const info = dir.query_info('standard::*', Gio.FileQueryInfoFlags.NONE, null);
this.clearRow.set_subtitle(`${info.get_size()} bytes`);
Expand All @@ -383,7 +383,7 @@ class MediaPlayerPage extends SubPage {
_clearCache() {
const dir = Gio.File.new_for_path(MEDIA_CACHE);
dir.trash(null);
dir.make_directory(null);
dir.make_directory_with_parents(null);
this.clearRow.set_subtitle(_('Cleared!'));
}
});
Expand Down
2 changes: 1 addition & 1 deletion widgets@aylur/shared/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ class PlayerWidget extends St.BoxLayout {
// track cover
[CACHE_PATH, MEDIA_CACHE].forEach(path => {
if (!GLib.file_test(path, GLib.FileTest.EXISTS))
Gio.File.new_for_path(path).make_directory(null);
Gio.File.new_for_path(path).make_directory_with_parents(null);
});

const fname = MEDIA_CACHE + `${this._mediaArtist.text}_${this._mediaTitle.text}`.replace(/[\,\*\?\"\<\>\|\#\:\?\/\']/g, '');
Expand Down

0 comments on commit b3419a3

Please sign in to comment.