cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

File Locking issue

htran-21
15-Moonstone

File Locking issue

Hi,

 

I have a test case as following

 

var testfile = 'test.txt'

me.CreateTextFile({ path: testfile, data: 'Hello, world!', overwrite: true }) // WORKING

me.CreateTextFile({ path: testfile, data: 'Good morning!', overwrite: true }) // WORKING

me.LoadText({ path: testfile }) // WORKING

me.DeleteFile({ path: testfile }) // NO ERROR, but the file isn't deleted me.CreateTextFile({ path: testfile, data: 'Bye bye!', overwrite: true }) // ERROR

ERROR: Wrapped java.lang.Exception: Unable to Create File [test.txt] Cause: Unable to Create File [test.txt]

 

My Bests,

Hung Tran

1 ACCEPTED SOLUTION

Accepted Solutions
htran-21
15-Moonstone
(To:htran-21)

Hi,

 

FYI, this is a known bug fixed by TW-36598 on Apr 3 2019 and applied for all Thingworx versions 7.4.19+ 

 

My Bests,

Hung Tran

View solution in original post

4 REPLIES 4
posipova
20-Turquoise
(To:htran-21)

Will it delete the file if you don't load it?

 

When you load the file, temporary locking occurs and until it's released, it won't delete.

 

What version of ThingWorx are you on?

htran-21
15-Moonstone
(To:posipova)

Hi posipova,

 

Yes, the file would be deleted if that's not loaded yet.

 

No, that's not a kind of temporarily locking, I believe that's a bug in code of reading a file content.

 

It is Thingworx 7.4.1-b62

 

My Bests,

Hung Tran

posipova
20-Turquoise
(To:htran-21)

I recall this being an issue in older versions. This should be fixed in latest patches on 8.x releases
htran-21
15-Moonstone
(To:htran-21)

Hi,

 

FYI, this is a known bug fixed by TW-36598 on Apr 3 2019 and applied for all Thingworx versions 7.4.19+ 

 

My Bests,

Hung Tran

Top Tags