1595343 print mUrl in DeleteAttachment. draft
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Mon, 23 May 2022 03:03:51 +0900
changeset 116829 91af6aa8886eb71335079d06e90b953e8cbfc291
parent 116828 645062ab9b78cc9208aa053256ba29d431baf7eb
child 116830 ed877192dbeb26a210f2168cd9c6369404986f16
push id15955
push userishikawa@yk.rim.or.jp
push dateSun, 22 May 2022 18:04:18 +0000
treeherdertry-comm-central@beaacca97fbd [default view] [failures only]
bugs1595343
1595343 print mUrl in DeleteAttachment.
mailnews/compose/src/nsMsgAttachment.cpp
--- a/mailnews/compose/src/nsMsgAttachment.cpp
+++ b/mailnews/compose/src/nsMsgAttachment.cpp
@@ -241,16 +241,28 @@ NS_IMETHODIMP nsMsgAttachment::EqualsUrl
 
 nsresult nsMsgAttachment::DeleteAttachment() {
   nsresult rv;
   bool isAFile = false;
 
   nsCOMPtr<nsIFile> urlFile;
   rv = NS_GetFileFromURLSpec(mUrl, getter_AddRefs(urlFile));
   NS_ASSERTION(NS_SUCCEEDED(rv), "Can't nsIFile from URL string");
+#ifdef DEBUG
+  if (!NS_SUCCEEDED(rv)) {
+    int rc = 0;
+#ifdef linux
+    rc = system("ls -ltr /tmp/");
+#endif
+    fprintf(stderr,
+            "{debug} DeleteAttachment: rv = 0x%" PRIx32
+            ", mUrl.data()==<<%s>>, rc=%d\n",
+            static_cast<uint32_t>(rv), mUrl.Data(), rc);
+  }
+#endif
   if (NS_SUCCEEDED(rv)) {
     bool bExists = false;
     rv = urlFile->Exists(&bExists);
     NS_ASSERTION(NS_SUCCEEDED(rv), "Exists() call failed!");
     if (NS_SUCCEEDED(rv) && bExists) {
       rv = urlFile->IsFile(&isAFile);
       NS_ASSERTION(NS_SUCCEEDED(rv), "IsFile() call failed!");
     }