View Issue Details

IDProjectCategoryView StatusLast Update
0031166FPCPackagespublic2019-12-19 14:36
ReporterCudaText man Assigned ToMichael Van Canneyt  
Status closedResolutionduplicate 
Product Version3.1.1 
Summary0031166: JsonConf: need share-more on read
Descriptionprocedure TJSONConfig.LoadFromFile(const AFileName: String);

here you dont allow shared-read. fmShare*** flag. My app has 2 starts at same time, and share-error in one app.
Wish: add share-mode-allowed
TagsNo tags attached.
Fixed in Revision
Attached Files


duplicate of 0031587 closedMichael Van Canneyt FCL-Json: should use fmShareDenyNone 


jamie philbrook

2016-12-24 23:34

reporter   ~0097070

two stupid questions;

  1. Did you try fmOpenRead+fmShareDenyNone;
  2. Did you try fmOpenRead+fmShareDenyWrite;

CudaText man

2016-12-24 23:58

reporter   ~0097071

I added today ShareDenyNone, fixed JsonConf, will test it in app.

Thaddy de Koning

2016-12-27 08:34

reporter   ~0097083

Last edited: 2016-12-27 08:39

View 4 revisions

These options should be or'ed,. not added. fmOpenRead or fmShareDenyNone;

Although on a properly designed API this may look interchangeable, they are different mathematical operations and can give different results. Never use "+" on these kind of Boolean flags. E.g. 2 or 2 <> 2 + 2 and who says 2 could not occur? E.g.2.: "or" also governs mutual exclusivity of option flags.

CudaText man

2016-12-27 10:09

reporter   ~0097085

Of course, "or". Pls,
fmOpenRead or fmShareDenyNone

jamie philbrook

2016-12-28 23:19

reporter   ~0097138


 It has been a long time practice of summing FileModes and FileShare values.

 At least in the windows world.
  FileModes use the first 4 bits. ShartModes the next 4 bits...

 A file state is created once by simply summing, due to their values .

  There are also higher file attributes not covered here, but they also can
be summed in the same way.

 Any modification to a variable holding a fileMode and sharing of course needs to be done via BIT math or simply recreate it via summing.


CudaText man

2017-03-23 16:31

reporter   ~0099173

Duplicate of 0031587, please close

Issue History

Date Modified Username Field Change
2016-12-24 22:48 CudaText man New Issue
2016-12-24 23:34 jamie philbrook Note Added: 0097070
2016-12-24 23:58 CudaText man Note Added: 0097071
2016-12-27 08:34 Thaddy de Koning Note Added: 0097083
2016-12-27 08:36 Thaddy de Koning Note Edited: 0097083 View Revisions
2016-12-27 08:37 Thaddy de Koning Note Edited: 0097083 View Revisions
2016-12-27 08:39 Thaddy de Koning Note Edited: 0097083 View Revisions
2016-12-27 10:09 CudaText man Note Added: 0097085
2016-12-28 23:19 jamie philbrook Note Added: 0097138
2017-03-23 16:31 CudaText man Note Added: 0099173
2017-03-23 21:38 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-03-23 21:38 Michael Van Canneyt Status new => assigned
2017-03-23 21:38 Michael Van Canneyt Relationship added duplicate of 0031587
2017-03-23 21:38 Michael Van Canneyt Status assigned => resolved
2017-03-23 21:38 Michael Van Canneyt Resolution open => duplicate
2019-12-19 14:36 CudaText man Status resolved => closed