Closed Bug 1438140 Opened 8 years ago Closed 8 years ago

[mozprofile] Add Unicode support for profile path

Categories

(Testing :: Mozbase, enhancement, P1)

Version 3
All
Windows
enhancement

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

On bug 1438035 I need unicode support for profile names and as it turns out parts of the mozprofile package are not able to handle that yet. Well, on Windows. Here one example for permissions.py and the usage of sqlite3: OperationalError: unable to open database file File "f:\code\gecko\testing/marionette/mach_commands.py", line 121, in marione tte_test return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs) File "f:\code\gecko\testing/marionette/mach_commands.py", line 65, in run_mari onette failed = MarionetteHarness(MarionetteTestRunner, args=vars(args)).run() File "f:\code\gecko\testing/marionette/harness\marionette_harness\runtests.py" , line 76, in run runner.cleanup() File "f:\code\gecko\testing/marionette/harness\marionette_harness\runner\base. py", line 1119, in cleanup self.marionette.instance.close(clean=True) File "f:\code\gecko\testing/marionette/client\marionette_driver\geckoinstance. py", line 339, in close self.profile.cleanup() File "f:\code\gecko\testing/mozbase/mozprofile\mozprofile\profile.py", line 16 2, in cleanup self.permissions.clean_db() File "f:\code\gecko\testing/mozbase/mozprofile\mozprofile\permissions.py", lin e 411, in clean_db permDB = sqlite3.connect(sqlite_file)
The problem above actually happened because I inappropriately encoded the profile path with utf-8 when passing it into `tempfile.mkdir()` within Marionette. The resulted path as used for the profile then caused the problem. By just removing the extra call to `encode()` on the unicode path fixed the problem.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.