Skip to content

Commit 598da2c

Browse files
committed
Fixed persistent images.
1 parent e142500 commit 598da2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18317,7 +18317,7 @@ function extend_response(PROTO) {
1831718317

1831818318
var req = this.req;
1831918319
if (!req.$key)
18320-
req.$key = createTemporaryKey(req, 'timg_');
18320+
req.$key = createTemporaryKey(req);
1832118321

1832218322
var key = req.$key;
1832318323

@@ -18350,7 +18350,7 @@ function extend_response(PROTO) {
1835018350

1835118351
var plus = F.id ? 'i-' + F.id + '_' : '';
1835218352

18353-
options.name = F.path.temp(plus + key);
18353+
options.name = F.path.temp((options.persistent ? 'timg_' : '') + plus + key);
1835418354

1835518355
if (options.persistent) {
1835618356
fsFileExists(options.name, $image_persistent, res);
@@ -18890,8 +18890,8 @@ function fsStreamRead(filename, options, callback, res) {
1889018890
* @param {ServerRequest or String} req
1889118891
* @return {String}
1889218892
*/
18893-
function createTemporaryKey(req, plus) {
18894-
return (plus || '') + (req.uri ? req.uri.pathname : req).replace(REG_TEMPORARY, '_').substring(1);
18893+
function createTemporaryKey(req) {
18894+
return (req.uri ? req.uri.pathname : req).replace(REG_TEMPORARY, '_').substring(1);
1889518895
}
1889618896

1889718897
F.createTemporaryKey = createTemporaryKey;

0 commit comments

Comments
 (0)