close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Delete file behavior does not check for the existence of the file

Thread began 3/04/2013 6:02 pm by neo314 | Last modified 3/06/2013 1:37 am by neo314 | 750 views | 2 replies |

neo314

Delete file behavior does not check for the existence of the file

Delete file behavior does not check for the existence of the file! That's pretty basic. If I have to hand code the condition, I may as well hand code the whole this.

I have a set of records that have attached PDF files. The delete behavior deletes the old pdf when a new one is uploaded. I added images, so the existing records did not have any images in them, but for the future, the delete behaviors is included and triggered on a successful upload.

I found that since the existing record's field was empty, WADA Delete file behavior throws an error.

It should in clude a condition that the field/value is not empty (or you'll get a can't unlink a directory error) and that the file exists.

Sign in to reply to this post

Jason ByrnesWebAssist

I have logged this as a bug in our system to be corrected in the next update.

to correct in your current site:

in the webassist/file_manipulation/helperphp.php file, change:

php:
if(file_exists($path) && is_writable($fullPath)){

        unlink($fullPath);
        $result = TRUE;
    }



to:

php:
if(file_exists($path) && is_file($path) && is_writable($fullPath)){

        unlink($fullPath);
        $result = TRUE;
    }
Sign in to reply to this post

neo314

Thanx Jason.

For anyone wanting to correct the source file so any reapplication or future application of the behavior is fixed, the file is at Configuration\Shared\WebAssist\DigitalFilePro\Helpers

On windows Vista/7 that would be:

C:\Users\[user name]\AppData\Roaming\Adobe\Dreamweaver CS6\en_US\Configuration\Shared\WebAssist\DigitalFilePro\Helpers

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...