Skip to content

Commit

Permalink
Windows path correction
Browse files Browse the repository at this point in the history
for NZBGet
  • Loading branch information
Michael Higgins committed Mar 5, 2015
1 parent 899112b commit 259792d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions NZBGetPostProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
#Sanity checks for path string
MP4folder = os.environ['NZBPO_MP4_FOLDER'].replace('"','')
MP4folder = MP4folder.replace("'","")
if not(MP4folder.endswith("/")):
if not(MP4folder.endswith("/")) and os.name != 'nt':
MP4folder += "/"
if not MP4folder.endswith("\\") and os.name == 'nt':
MP4folder += "\\"
#DEBUG#print MP4folder+" the original is "+os.environ['NZBPO_MP4_FOLDER']

if MP4folder != os.environ['NZBPO_MP4_FOLDER']:
Expand Down Expand Up @@ -219,4 +221,4 @@

else:
print "[ERROR] This script can only be called from NZBGet (11.0 or later)."
sys.exit(0)
sys.exit(0)

0 comments on commit 259792d

Please sign in to comment.