Skip to content

Commit

Permalink
Fixed issue with checking space given relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogMan151 authored Oct 8, 2018
1 parent 9af29b0 commit cc2d9ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions splitNSP.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# Author: AnalogMan
# Modified Date: 2018-10-07
# Modified Date: 2018-10-08
# Purpose: Splits Nintendo Switch NSP files into parts for installation on FAT32

import os
Expand All @@ -14,7 +14,7 @@

def splitQuick(filepath):
fileSize = os.path.getsize(filepath)
info = shutil.disk_usage(os.path.dirname(filepath))
info = shutil.disk_usage(os.path.dirname(os.path.abspath(filepath)))
if info.free < splitSize:
print('Not enough temporary space. Needs 4GiB of free space\n')
return
Expand Down Expand Up @@ -76,7 +76,7 @@ def splitQuick(filepath):

def splitCopy(filepath):
fileSize = os.path.getsize(filepath)
info = shutil.disk_usage(os.path.dirname(filepath))
info = shutil.disk_usage(os.path.dirname(os.path.abspath(filepath)))
if info.free < fileSize*2:
print('Not enough free space to run. Will require twice the space as the NSP file\n')
return
Expand Down

0 comments on commit cc2d9ee

Please sign in to comment.