Skip to content

Commit

Permalink
Merge pull request #173 from theohbrothers/enhancement/use-full-path-…
Browse files Browse the repository at this point in the history
…for-env-temp-instead-of-the-msdos-8.3-shortened-path

Enhancement: Use full path for `$env:TEMP` instead of the MSDOS 8.3 shortened path
  • Loading branch information
leojonathanoh authored Aug 4, 2023
2 parents 818bcd9 + 918ad78 commit d2a3100
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ConvertOneNote2MarkDown-v2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,8 @@ Function New-SectionGroupConversionConfig {
$pageCfg['tmpPath'] = & {
$dateNs = Get-Date -Format "yyyy-MM-dd-HH-mm-ss-fffffff"
if ($env:OS -match 'windows') {
[io.path]::combine($env:TEMP, $cfg['notebookName'], $dateNs)
# Ensure $env:TEMP is not MSDOS 8.3 shortened name, but the actual full path. See: https://superuser.com/questions/1524767/powershell-uses-the-short-8-3-form-for-envtemp
[io.path]::combine((Get-Item $env:TEMP).FullName, $cfg['notebookName'], $dateNs)
}else {
[io.path]::combine('/tmp', $cfg['notebookName'], $dateNs)
}
Expand Down

0 comments on commit d2a3100

Please sign in to comment.