Skip to content

Commit e8f6a37

Browse files
committed
CoreWM: IconView now makes desktop folder on demand
1 parent 649a111 commit e8f6a37

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/packages/default/CoreWM/iconview.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,20 @@
244244
}));
245245
}
246246
});
247-
}, 50);
247+
}, 150);
248248
};
249249

250250
DesktopIconView.prototype._save = function(refresh) {
251251
var desktopPath = OSjs.Core.getWindowManager().getSetting('desktopPath');
252252
var path = Utils.pathJoin(desktopPath, '.shortcuts.json');
253+
var cache = this.shortcutCache;
253254

254-
VFS.write(path, JSON.stringify(this.shortcutCache, null, 4), function(e, r) {
255-
if ( refresh ) { // Normally caught by VFS message in main.js
256-
//self._refresh();
257-
}
255+
VFS.mkdir(Utils.dirname(path), function(err) {
256+
VFS.write(path, JSON.stringify(cache, null, 4), function(e, r) {
257+
if ( refresh ) { // Normally caught by VFS message in main.js
258+
//self._refresh();
259+
}
260+
});
258261
});
259262
};
260263

0 commit comments

Comments
 (0)