From 076fd47cbe8aa134e110298cdb8c4e422e10ab98 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 4 May 2012 19:45:38 +0200 Subject: [PATCH] Make sure guessit doesnt loop endless. fix #136 --- libs/guessit/fileutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/guessit/fileutils.py b/libs/guessit/fileutils.py index e146390c..bd315bc1 100644 --- a/libs/guessit/fileutils.py +++ b/libs/guessit/fileutils.py @@ -51,8 +51,8 @@ def split_path(path): if head == '/' and tail == '': return ['/'] + result - # on Windows, the root folder is a drive letter (eg: 'C:\') - if len(head) == 3 and head[1:] == ':\\' and tail == '': + # on Windows, the root folder is a drive letter (eg: 'C:\') or for shares \\ + if ((len(head) == 3 and head[1:] == ':\\') or (len(head) == 2 and head == '\\\\')) and tail == '': return [head] + result if head == '' and tail == '':