1595343 print mUrl in DeleteAttachment.
draft
1595343 print mUrl in DeleteAttachment.
--- 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!");
}