Hello noel,
I'd like you to do a code review. Please execute
g4 diff -c 8983669
or point your web browser to
http://mondrian/8983669
to review the following code:
Change 8983669 by [EMAIL PROTECTED] on 2008/11/13 14:53:09 *pending*
In drop_target_ff, we now ignore directories in drops.
R=noel
[EMAIL PROTECTED]
DELTA=9 (6 added, 3 deleted, 0 changed)
OCL=8983669
Affected files ...
... //depot/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc#13
edit
9 delta lines: 6 added, 3 deleted, 0 changed
Also consider running:
g4 lint -c 8983669
which verifies that the changelist doesn't introduce new style violations.
If you can't do the review, please let me know as soon as possible. During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately. Visit
http://www/eng/code_review.html for more information.
This is a semiautomated message from "g4 mail". Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8983669 by [EMAIL PROTECTED] on 2008/11/13 14:53:09 *pending*
In drop_target_ff, we now ignore directories in drops.
Affected files ...
... //depot/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc#13
edit
==== //depot/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc#13 -
c:\devel\srcwingears2/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/drop_target_ff.cc
2008-11-13 14:52:01.000000000 +1100
+++ googleclient/gears/opensource/gears/desktop/drop_target_ff.cc
2008-11-13 14:41:23.000000000 +1100
@@ -361,6 +361,11 @@
nr = file->GetPath(path);
if (NS_FAILED(nr)) { return false; }
+ PRBool bool_result = false;
+ if (NS_FAILED(file->IsDirectory(&bool_result)) || bool_result) {
+ continue;
+ }
+
nsCOMPtr<nsILocalFile> local_file =
do_CreateInstance("@mozilla.org/file/local;1", &nr);
if (NS_FAILED(nr)) { return false; }
@@ -369,14 +374,12 @@
nr = local_file->InitWithPath(path);
if (NS_FAILED(nr)) { return false; }
+ nr = NS_ERROR_FAILURE;
nsString filename;
- PRBool bool_result;
if (NS_SUCCEEDED(file->IsSymlink(&bool_result)) && bool_result) {
nr = local_file->GetTarget(filename);
} else if (NS_SUCCEEDED(file->IsFile(&bool_result)) && bool_result) {
nr = local_file->GetPath(filename);
- } else {
- nr = NS_ERROR_FAILURE;
}
if (NS_FAILED(nr)) { return false; }
#endif