Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Issue 1402243003: [shell_util] Fall Back to Long Paths if Short Is Not Available (Closed)

Created:
5 years, 2 months ago by Mark P
Modified:
5 years, 2 months ago
Reviewers:
gab, grt (UTC plus 2)
CC:
chromium-reviews, grt+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[shell_util] Fall Back to Long Paths if Short Is Not Available If GetShortPathName() fails (and hence so does ShortNameFromPath()), fall back to the long name. It's not clear to me whether the difference between UNKNOWN and NOT_DEFAULT is meaningfully used anyway. Maybe the code reviewer knows. This change revises ProbeOpenCommandHandlers() so it will always return yes or no, no more maybe about it. TBR=gab BUG=543306 Committed: https://crrev.com/2d04ece803beb091016667fc0b3945c6e24e7373 Cr-Commit-Position: refs/heads/master@{#354396}

Patch Set 1 #

Patch Set 2 : fix wrong variable name #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -9 lines) Patch
M chrome/installer/util/shell_util.cc View 1 2 chunks +12 lines, -9 lines 8 comments Download

Depends on Patchset:

Messages

Total messages: 21 (3 generated)
Mark P
gab@, please take a look. thanks, mark Feel free to put it on the commit ...
5 years, 2 months ago (2015-10-14 23:51:11 UTC) #2
gab
I think this code could just use ProgramCompare instead of doing string comparisons, @grt WDYT? ...
5 years, 2 months ago (2015-10-15 14:21:43 UTC) #4
Mark P
https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/shell_util.cc#newcode1313 chrome/installer/util/shell_util.cc:1313: app_path = chrome_exe.value(); On 2015/10/15 14:21:43, gab wrote: > ...
5 years, 2 months ago (2015-10-15 16:27:48 UTC) #5
gab
Replying to comment. @grt still looking for you advice on first comment. Thanks! https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/shell_util.cc File ...
5 years, 2 months ago (2015-10-15 18:33:07 UTC) #6
Mark P
https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/shell_util.cc#newcode1313 chrome/installer/util/shell_util.cc:1313: app_path = chrome_exe.value(); On 2015/10/15 18:33:07, gab wrote: > ...
5 years, 2 months ago (2015-10-15 19:17:42 UTC) #7
Mark P
gab@ apparently had no objections to this change, just a question about doing it better ...
5 years, 2 months ago (2015-10-15 21:48:51 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1402243003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1402243003/20001
5 years, 2 months ago (2015-10-15 21:50:03 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 2 months ago (2015-10-15 23:14:15 UTC) #11
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/2d04ece803beb091016667fc0b3945c6e24e7373 Cr-Commit-Position: refs/heads/master@{#354396}
5 years, 2 months ago (2015-10-15 23:14:49 UTC) #12
gab
https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/shell_util.cc#newcode1313 chrome/installer/util/shell_util.cc:1313: app_path = chrome_exe.value(); On 2015/10/15 19:17:42, Mark P wrote: ...
5 years, 2 months ago (2015-10-16 19:02:17 UTC) #13
gab
On 2015/10/15 21:48:51, Mark P wrote: > gab@ apparently had no objections to this change, ...
5 years, 2 months ago (2015-10-16 19:14:29 UTC) #14
gab
On 2015/10/16 19:14:29, gab wrote: > On 2015/10/15 21:48:51, Mark P wrote: > > gab@ ...
5 years, 2 months ago (2015-10-16 19:17:09 UTC) #15
Mark P
On 2015/10/16 19:14:29, gab wrote: > On 2015/10/15 21:48:51, Mark P wrote: > > gab@ ...
5 years, 2 months ago (2015-10-16 23:02:44 UTC) #16
grt (UTC plus 2)
in my primitive tests, GetShortPathName works fine on XP. can you point me to logs ...
5 years, 2 months ago (2015-10-18 01:10:46 UTC) #17
Mark P
On Sat, Oct 17, 2015 at 6:10 PM, <grt@chromium.org> wrote: > in my primitive tests, ...
5 years, 2 months ago (2015-10-18 04:42:02 UTC) #18
grt (UTC plus 2)
On 2015/10/18 04:42:02, Mark P wrote: > On Sat, Oct 17, 2015 at 6:10 PM, ...
5 years, 2 months ago (2015-10-18 13:49:46 UTC) #19
gab
On 2015/10/16 23:02:44, Mark P wrote: > On 2015/10/16 19:14:29, gab wrote: > > On ...
5 years, 2 months ago (2015-10-19 18:56:20 UTC) #20
grt (UTC plus 2)
5 years, 2 months ago (2015-10-19 19:30:39 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/s...
File chrome/installer/util/shell_util.cc (right):

https://codereview.chromium.org/1402243003/diff/20001/chrome/installer/util/s...
chrome/installer/util/shell_util.cc:1334: if
(!base::FilePath::CompareEqualIgnoreCase(short_path, app_path))
On 2015/10/15 14:21:43, gab wrote:
> Actually, @grt: shouldn't this entire method use ProgramCompare instead and
stop
> being bothered by doing strcmp on short/long paths?

Might be a good idea, although the condition leading to the benign error message
on the bot will still be there: GetShortPathName and ProgramCompare both work
best on files that exist/are accessible. The errors on the bot indicate that a
portion of the path passed in to ShortNameFromPath are inaccessible/don't exist.
This should be investigated, as it doesn't make sense. Is there a permissions
problem on the bot?

Powered by Google App Engine
This is Rietveld 408576698