[PR #948] [MERGED] Removes sed command from Dockerfile #1096

Closed
opened 2026-03-02 16:03:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/prasathmani/tinyfilemanager/pull/948
Author: @efremovd
Created: 1/23/2023
Status: Merged
Merged: 1/24/2023
Merged by: @prasathmani

Base: masterHead: fix-docker-sed


📝 Commits (1)

  • c69e132 Removes sed from Dockerfile

📊 Changes

1 file changed (+0 additions, -2 deletions)

View changed files

📝 Dockerfile (+0 -2)

📄 Description

They were needed before because they changed example config.php to make it workable. Now we don't have it and running sed against main php file just removes a lot of code and forces data path for directory

Example of changes before sed:

// clean and check $root_path
$root_path = rtrim($root_path, '\\/');
$root_path = str_replace('\\', '/', $root_path);
if (!@is_dir($root_path)) {
    echo "<h1>".lng('Root path')." \"{$root_path}\" ".lng('not found!')." </h1>";
    exit;
}

becomes after sed:

$root_path = $_SERVER['DOCUMENT_ROOT'].'/data';
$root_path = $_SERVER['DOCUMENT_ROOT'].'/data';
if (!@is_dir($root_path)) {
    echo "<h1>".lng('Root path')." \"{$root_path}\" ".lng('not found!')." </h1>";
    exit;
}

thus forcing data as a path and ignores whatever what set in config.php


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/prasathmani/tinyfilemanager/pull/948 **Author:** [@efremovd](https://github.com/efremovd) **Created:** 1/23/2023 **Status:** ✅ Merged **Merged:** 1/24/2023 **Merged by:** [@prasathmani](https://github.com/prasathmani) **Base:** `master` ← **Head:** `fix-docker-sed` --- ### 📝 Commits (1) - [`c69e132`](https://github.com/prasathmani/tinyfilemanager/commit/c69e13237b003c923fe58ca1b1fcdc5c0665f4df) Removes sed from Dockerfile ### 📊 Changes **1 file changed** (+0 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+0 -2) </details> ### 📄 Description They were needed before because they changed example config.php to make it workable. Now we don't have it and running sed against main php file just removes a lot of code and forces data path for directory Example of changes before sed: ```php // clean and check $root_path $root_path = rtrim($root_path, '\\/'); $root_path = str_replace('\\', '/', $root_path); if (!@is_dir($root_path)) { echo "<h1>".lng('Root path')." \"{$root_path}\" ".lng('not found!')." </h1>"; exit; } ``` becomes after sed: ```php $root_path = $_SERVER['DOCUMENT_ROOT'].'/data'; $root_path = $_SERVER['DOCUMENT_ROOT'].'/data'; if (!@is_dir($root_path)) { echo "<h1>".lng('Root path')." \"{$root_path}\" ".lng('not found!')." </h1>"; exit; } ``` thus forcing data as a path and ignores whatever what set in config.php --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 16:03:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#1096
No description provided.