Opened 10 years ago

Closed 9 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:
Has a Patch: yes 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)

installer.patch (1.3 KB) - added by idefix 10 years ago.
(patch) get Installer to show unzipped files when installing to volume containing space

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by stippi

Owner: changed from korli to stippi
Status: newassigned

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?

comment:2 Changed 10 years ago by stippi

Or BString::FindFirst() with either of the format strings.

comment:3 in reply to:  1 Changed 10 years ago by idefix

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.

comment:4 Changed 10 years ago by idefix

Somewhat earlier than planned: installer.patch

There are two issues with this patch:

  1. 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).
  1. 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?

Changed 10 years ago by idefix

Attachment: installer.patch added

(patch) get Installer to show unzipped files when installing to volume containing space

comment:5 Changed 10 years ago by idefix

Now that I think of it,

int pos = line.FindLast("  -> ");

might be replaced with

int pos = line.FindFirst("  -> ");

for better performance?

comment:6 Changed 10 years ago by idefix

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 in reply to:  4 Changed 10 years ago by idefix

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 Changed 9 years ago by idefix

Has a Patch: set

comment:9 Changed 9 years ago by stippi

Resolution: fixed
Status: in-progressclosed

Applied in hrev36848. Thanks a lot and sorry for the delay. I've made small adjustments, but tested everything.

Note: See TracTickets for help on using tickets.