Opened 15 years ago
Closed 14 years ago
#4732 closed bug (fixed)
Installer doesn't show expanded files when installing to a volume with a space in it
Reported by: | idefix | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Installer | Version: | R1/alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
When you install Haiku from the R1/Alpha1 cd to a volume with a space in it (eg. Haiku test
), it won't show the file it's currently expanding from the optional packages but shows the first part of the volume name (eg. \Haiku
).
This is caused by the sscanf
function stopping at the first space it encounters. See source:haiku/trunk/src/apps/installer/UnzipEngine.cpp#L306.
Attachments (1)
Change History (10)
follow-up: 3 comment:1 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 15 years ago
Replying to stippi:
It could be fixed by trying strstr() with either of the format strings to get the offset until the path within line. Want to give it a try?
Sure, but it could take a couple of weeks.
follow-up: 7 comment:4 by , 15 years ago
Somewhat earlier than planned: installer.patch
There are two issues with this patch:
- If the volume name contains " -> ", Installer will still show part of the volume name.
- I don't think this scenario is likely to happen (at least it will be a lot less likely than a volume name containing a space).
- The names of the inflated files that Installer shows have two spaces appended to them.
- As far as I can see, this was also the case with the previous code. And it isn't visible in Installer.
Should I try to fix any of these issues?
by , 15 years ago
Attachment: | installer.patch added |
---|
(patch) get Installer to show unzipped files when installing to volume containing space
comment:5 by , 15 years ago
Now that I think of it,
int pos = line.FindLast(" -> ");
might be replaced with
int pos = line.FindFirst(" -> ");
for better performance?
comment:6 by , 15 years ago
BTW: There's also one other sscanf
function at source:haiku/trunk/src/apps/installer/UnzipEngine.cpp#L259. But I'm not sure if that one needs to be replaced too.
comment:7 by , 15 years ago
Replying to idefix:
- As far as I can see, this was also the case with the previous code. [...]
This isn't correct, those spaces wouldn't get copied by sscanf
.
comment:8 by , 14 years ago
patch: | → 1 |
---|
comment:9 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Applied in hrev36848. Thanks a lot and sorry for the delay. I've made small adjustments, but tested everything.
It could be fixed by trying strstr() with either of the format strings to get the offset until the path within line. Want to give it a try?