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)

installer.patch (1.3 KB ) - added by idefix 15 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 by stippi, 15 years ago

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 by stippi, 15 years ago

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

in reply to:  1 comment:3 by idefix, 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.

comment:4 by idefix, 15 years ago

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?

by idefix, 15 years ago

Attachment: installer.patch added

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

comment:5 by idefix, 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 idefix, 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.

in reply to:  4 comment:7 by idefix, 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 idefix, 14 years ago

patch: 1

comment:9 by stippi, 14 years ago

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.