Colin Xu opened 1 year ago
|
|||||
Although the method name is deleteFile, it also handles deletion of a directory after cleaning it up. Can you please attach a sampe repo to demonstrate the issue? |
|||||
Steps to reproduce:
|
|||||
Still works at my side. Are you able to reproduce this every time? On which platform OneDev is running? |
|||||
Yes, it can be reproduced every time. OneDev is running in an LXC virtual machine on PVE, and the virtual machine system is Debian 11. When the Executor is a Docker Executor, everything works fine. The following is an exception build log file. |
|||||
I do not have that enviroment. Just tested on a EC2 debian VM and everything works fine. I guess LXC@PVE does not make any difference in this regard. Are you sure you can reproduce this with the simple setup? |
|||||
It may be an issue with character encoding. The files with English file names in the same directory were deleted, leaving only two files with Chinese file names. When I tested it on a problematic machine, the file names read as garbled characters. The screenshot below shows the result I obtained from debugging and the original file name. This is why these two files cannot be deleted. Can we call the system command to delete again if deletion fails? |
|||||
Looks like your machine is not using UTF-8 as the default encoding. Changing OneDev to resort to system delete command in this case hurts its cross-platform ability, and also you may have other troubles such as publishing artifacts/reports from files. I'd suggest to correct encoding of your machine. There are a number of ways to do that, and a simple approach is to specify environment variable |
|||||
Yes, you are correct. I changed the system character encoding and the issue was resolved. Thank you. |
|||||
Robin Shen changed state to 'Closed' 1 year ago
|
Type |
Bug
|
Priority |
Major
|
Assignee | |
Affected Versions |
Versions 8.0.15 and below
|
When the system tries to clear the workspace, it mistakes a directory for a file and attempts to delete it, resulting in an exception being thrown as shown in the screenshot below.
I confirm that ISSUE_TEMPLATE is a directory and not a file.