Fixes build break due to read-only underlay dirs, e.g. basewiki.
Signed-off-by: intrigeri <intrigeri@boum.org>
return 0 unless defined $file;
return 0 if (defined pagetype($file) && pagetype($file) eq 'po');
return 0 if $file =~ /\.pot$/;
+ return 0 unless -e "$config{srcdir}/$file"; # underlay dirs may be read-only
return 1 if pagespec_match(pagename($file), $config{po_translatable_pages});
return;
}
### Enabling/disabling the plugin
-- enabling the plugin with `po_translatable_pages` set to blacklist:
- **breaks** due to read-only basewiki
-- enabling the plugin with `po_translatable_pages` set to whitelist:
- **OK**
+- enabling the plugin with `po_translatable_pages` set to blacklist: **OK**
+- enabling the plugin with `po_translatable_pages` set to whitelist: **OK**
- enabling the plugin without `po_translatable_pages` set: **OK**
- disabling the plugin: **OK**