You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you process filenames or filepaths containing ``.`` or ``..`` with the ``sanitize_filename`` function or the ``sanitize_filepath`` function, by default, ``sanitize_filename`` does nothing, and ``sanitize_filepath`` normalizes the filepaths:
7
+
8
+
.. code-block:: python
9
+
10
+
print(sanitize_filename("."))
11
+
print(sanitize_filepath("hoge/./foo"))
12
+
13
+
.. code-block:: console
14
+
15
+
.
16
+
hoge/foo
17
+
18
+
If you would like to replace ``.`` and ``..`` like other reserved words, you need to specify the arguments as follows:
19
+
20
+
.. code-block:: python
21
+
22
+
from pathvalidate import sanitize_filepath, sanitize_filename
0 commit comments