Commit 283e50c9 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

uprcl: fix python3 issue in search + pwd not working any more (looping)...

uprcl: fix python3 issue in search + pwd not working any more (looping) because of indentation issue.
parent aba967ca
......@@ -348,13 +348,25 @@ class Folders(object):
lpath = []
while True:
fathidx = self._dirvec[diridx][".."][0]
found = False
for nm, ids in self._dirvec[fathidx].items():
if ids[0] == diridx:
lpath.append(nm)
found = True
break
diridx = fathidx
if diridx == 0:
break
# End for
if not found:
uplog("uprclfolders: pwd failed for %s \
(father not found), returning /" % objid)
return "/"
if len(lpath) > 200:
uplog("uprclfolders: pwd failed for %s \
(looping), returning /" % objid)
return "/"
diridx = fathidx
if diridx == 0:
break
if not lpath:
path = "/"
......
......@@ -14,6 +14,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
import sys
PY3 = sys.version > '3'
import re
from recoll import recoll
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment