2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00

[fix] db name section in sidebar showing absolute path instead of dbname in windows i.e. platform=win32

This commit is contained in:
Jaffrey98 2019-01-26 10:59:44 +05:30
parent aa721b59cc
commit 3653fa9b55

View File

@ -17,6 +17,7 @@
</div>
</template>
<script>
const path = require('path');
export default {
data() {
return {
@ -54,7 +55,7 @@ export default {
const accountingSettings = await frappe.getDoc('AccountingSettings');
this.companyName = accountingSettings.companyName;
if (localStorage.dbPath) {
const parts = localStorage.dbPath.split('/');
const parts = localStorage.dbPath.split(path.sep);
this.dbFileName = parts[parts.length - 1];
}
},