Commit d0a9eb1
authored
Fix import-dir logging for notebooks in subdirectories on Windows (#4250)
## Changes
When importing notebooks from subdirectories on Windows, the log output
showed incorrect paths with backslashes instead of forward slashes.
Example buggy output:
```
subdir\nested\notebook.py -> /Users/.../subdir\nested\notebook
```
Expected output:
```
subdir\nested\notebook.py -> /Users/.../subdir/nested/notebook
```
The bug was in lines 74-75 of import_dir.go where path.Ext() and
strings.TrimSuffix() operated on localName (with backslashes) instead of
remoteName (already converted to forward slashes via filepath.ToSlash).
## Why
Found this while investigating the `TestImportDir` failures.
## Tests
Tested on Windows 10 (10.0.26100.7462) with nested notebook files.
Root-level notebooks were unaffected. The actual import operation worked
correctly in both versions - only log output was impacted.1 parent 35e5b2c commit d0a9eb1
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments