From 9f49cd1cb06a93dda151a74741db383e4bc174d7 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Tue, 26 Jan 2016 10:02:56 +1100
Subject: [PATCH] Fix T47236: Error importing OBJ

Missed this in recent bytes -> string conversion
---
 io_scene_obj/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index 34b936f0d..aff0b3454 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -142,7 +142,7 @@ class ImportOBJ(bpy.types.Operator, ImportHelper, IOOBJOrientationHelper):
 
         if bpy.data.is_saved and context.user_preferences.filepaths.use_relative_paths:
             import os
-            keywords["relpath"] = os.path.dirname((bpy.data.path_resolve("filepath", False).as_bytes()))
+            keywords["relpath"] = os.path.dirname(bpy.data.filepath)
 
         return import_obj.load(context, **keywords)
 
-- 
GitLab