WebFreak001 / FSWatch

A cross-platform folder & file watching library using win32, inotify or std.file
33 stars 8 forks source link

Assigning FileWatch struct failing in dmd v2.086.0 #19

Closed SrMordred closed 5 years ago

SrMordred commented 5 years ago

With error: Error: cannot modify struct instance watcher of type FileWatch because it contains const or immutable members

(It´s suppose to be possible?) https://github.com/WebFreak001/FSWatch/blob/63b46f971247596da23dceb3007793e1aff254ae/source/fswatch.d#L693

WebFreak001 commented 5 years ago

uh does it work if you change the const string path to string path?

SrMordred commented 5 years ago

Probably yes, I just wondered if this was a design choice from the beginning ( and the strange fact that only now on this dmd version the error appeared )

WebFreak001 commented 5 years ago

The path is just informational and not reassignable as it won't update the underlying handles. It should only prevent that and nothing else.

WebFreak001 commented 5 years ago

fixed with f8463b3 (should be 0.5.0 in a minute)