Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #336 from bookchin/master
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
bookchin authored Aug 9, 2016
2 parents fe3fff0 + 53802bd commit 3d4553b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
36 changes: 22 additions & 14 deletions app/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var about = require('./package');
var Updater = require('./lib/updater');
var UserData = require('./lib/userdata');
var Tab = require('./lib/tab');
var diskspace = require('fd-diskspace').diskSpaceSync;
var diskspace = require('fd-diskspace').diskSpace;
var storj = require('storj');
var Monitor = storj.Monitor;
var SpeedTest = require('myspeed').Client;
Expand Down Expand Up @@ -541,20 +541,28 @@ var main = new Vue({

},
getFreeSpace: function(tab) {
var disks = diskspace().disks;
var free = 0;

for (var disk in disks) {
if (tab.storage.path.indexOf(disk) !== -1) {
// The `df` command on linux returns KB by default, so we need to
// convert to bytes.
free = process.platform === 'win32' ?
disks[disk].free :
disks[disk].free * 1000;
var self = this;

diskspace(function(err, result) {
if (err) {
return;
}
}
var freespace = utils.autoConvert({size: free, unit: 'B'});
this.freespace = freespace;

var free = 0;

for (var disk in result.disks) {
if (tab.storage.path.indexOf(disk) !== -1) {
// The `df` command on linux returns KB by default, so we need to
// convert to bytes.
free = process.platform === 'win32' ?
result.disks[disk].free :
result.disks[disk].free * 1000;
}
}

var freespace = utils.autoConvert({size: free, unit: 'B'});
self.freespace = freespace;
});
}
},
created: function() {
Expand Down
12 changes: 4 additions & 8 deletions resources/linux/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/sh
FILE=/usr/local/bin/storjshare
FILE2=/opt/storjshare/storjshare
if [[ -L $FILE ]]; then
echo "File exists and there is a symbolic link"
else
echo "Creating symbolic link between $FILE and $FILE2"
ln -s $FILE2 $FILE
fi

###
# Any post-install logic on debian based systems goes here
###

0 comments on commit 3d4553b

Please sign in to comment.