Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced string path in _dh with PosixPath() #13669

Merged
merged 1 commit into from Aug 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions IPython/core/magics/osm.py
Expand Up @@ -8,6 +8,7 @@

import io
import os
import pathlib
import re
import sys
from pprint import pformat
Expand Down Expand Up @@ -409,7 +410,7 @@ def cd(self, parameter_s=''):
except OSError:
print(sys.exc_info()[1])
else:
cwd = os.getcwd()
cwd = pathlib.Path.cwd()
dhist = self.shell.user_ns['_dh']
if oldcwd != cwd:
dhist.append(cwd)
Expand All @@ -419,7 +420,7 @@ def cd(self, parameter_s=''):
os.chdir(self.shell.home_dir)
if hasattr(self.shell, 'term_title') and self.shell.term_title:
set_term_title(self.shell.term_title_format.format(cwd="~"))
cwd = os.getcwd()
cwd = pathlib.Path.cwd()
dhist = self.shell.user_ns['_dh']

if oldcwd != cwd:
Expand Down