Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Noramlizes directories, adds UTF-8 file names

AuthorDaveJarvis <email>
Date2026-01-19 22:06:37 GMT-0800
Commitba9a739d975120358cb791c5cac8628f62ac9c80
Parent585e92b
Delta7 lines added, 4 lines removed, 3-line increase
src/main/java/com/keenwrite/processors/html/XhtmlProcessor.java
}
- final var relative = imagesDir.relativize( location );
+ final var relative = imagesDir.normalize().relativize( location );
attr.setTextContent( relative.toString() );
final var filename = format(
"%s%s%s", src, extension.isBlank() ? "" : ".", extension );
- imageFile = imagePath.resolve( filename );
+ imageFile = imagePath.resolve( filename ).normalize();
if( toFile( imageFile ).exists() ) {
found = true;
break;
}
}
if( !found ) {
imagePath = getDocumentDir();
- imageFile = imagePath.resolve( src );
+ imageFile = imagePath.resolve( src ).normalize();
if( !toFile( imageFile ).exists() ) {
keenwrite.sh
readonly SCRIPT_DIR="$(cd "${SCRIPT_SRC}" >/dev/null 2>&1 && pwd)"
+# Ensure UTF-8 file names can be read on all systems.
+export LC_ALL=C.UTF-8
+export LANG=C.UTF-8
+
java \
-Dprism.order=sw \
publish.sh
echo "${RELEASE}" > "${FILE_VERSION}"
upload "${FILE_VERSION}"
-mv "${FILE_VERSION}" "www/downloads"