[Bug] health_check.bat creates a stray empty directory (e.g. C:\Program) when the install path contains a space
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- shell
- Ambito
- operating-systems, tooling
Direzione di ricerca
Inizia da scripts/tools/windows/ops/health_check.bat, concentrandoti sulla routine :local_dirs_check e sulla relativa iterazione delle directory. Riproduci il problema con IoTDB installato in un percorso contenente spazi, quindi verifica che tools\windows\ops\health_check.bat -o local riporti ogni directory configurata come un unico percorso e non crei alcuna directory estranea.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I searched in the issues and found nothing similar.
Version
Reproduced on 2.0.8 and current master (identical code). Present since the tool was introduced (#12325); not addressed by #12435 (launch scripts) or #12450 (permission-detection logic).
Environment:
- OS: Windows (reproduces wherever the install path contains a space)
- IoTDB: 2.0.8 and master
Describe the bug and provide the minimal reproduce step
On Windows, if IoTDB is located under a path that contains a space (e.g. C:\Program Files\iotdb), the health-check tool's Installation Environment(Directory Access) check splits directory paths at the space. It:
- creates a stray empty directory such as
C:\Program, and - prints garbled results - e.g.
"C:\Program" has write permissionfollowed by"Files\...\ext\pipe" has write permission- instead of one line for the real directory.
To reproduce:
- Unzip/install IoTDB into a path containing a space, e.g.
C:\Program Files\iotdb(orC:\test dir\iotdb). - Run
tools\windows\ops\health_check.bat -o local. - Observe a stray empty
C:\Programdirectory, and split/garbled lines in the Directory Access section.
Any configured directory under the spaced install path triggers it; the ext/* dirs (pipe_lib_dir / udf_lib_dir / trigger_lib_dir) hit it by default because they resolve to %IOTDB_HOME%\ext\....
Affected file: scripts/tools/windows/ops/health_check.bat, routine :local_dirs_check.
Root cause:
:local_dirs_check joins the directory variables into spacedirs with spaces and iterates with for %%a in (%spacedirs%). The for ... in (set) form tokenizes on spaces (and ,/;), so a path containing a space is split into two
tokens. The inner for %%b/%%c loops already preserve spaces for the ;/, multi-dir separators via the "!var:;=" "!" technique, but the outer space-join defeats that. Separately, %%c (from for %%c in ("...")) still carries its
surrounding quotes, so mkdir "%%c" expands to mkdir ""C:\Program Files\..."" - a doubly-quoted path the argument parser re-splits.
What did you expect to see?
Each configured directory is checked as a single path; no stray directory is created; the output has one clean line per directory.
What did you see instead?
The tool splits directory paths at the space and creates a stray directory.
Anything else?
The docs recommend a space-free install path, but the tool shouldn't create stray directories or emit corrupt output when that guidance isn't met - especially since Windows users frequently install under C:\Program Files. A minimal fix is
available (see PR).
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Lingua principale
- Java
- Stelle
- 6.4k
- Fork
- 1.2k
- Merge medio
- 1g 17h
- PR unite (30g)
- 152
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/iotdb
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports success Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column name Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Tutte le issue di apache/iotdb
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
inu-appcenter/memorIN-backend#288 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
frontend maui-pilot pilot-ask question
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·