Skip to content

Commit

Permalink
refix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikachu2333 authored Jan 8, 2024
1 parent 103e9eb commit 0a3a7e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion default.aproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="name_exchanger" libEmbed="true" icon="123.ico" ui="win" output="name_exchanger.exe" CompanyName="None" FileDescription="Exchange the name of two files." LegalCopyright="Copyright (C) Mika 2023 MIT License" ProductName="name_exchanger" InternalName="name_exchanger" FileVersion="2.3.0.55" ProductVersion="2.3.0.55" publishDir="/dist/" dstrip="true" local="false" ignored="false">
<project ver="10" name="name_exchanger" libEmbed="true" icon="123.ico" ui="win" output="name_exchanger.exe" CompanyName="None" FileDescription="Exchange the name of two files." LegalCopyright="Copyright (C) Mika 2023 MIT License" ProductName="name_exchanger" InternalName="name_exchanger" FileVersion="2.3.0.56" ProductVersion="2.3.0.56" publishDir="/dist/" dstrip="true" local="false" ignored="false">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false"/>
<folder name="窗体文件" path="dlg" comment="目录" embed="true" local="false" ignored="false"/>
Expand Down
8 changes: 4 additions & 4 deletions main.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ change_main = function(path1,path2){
}

var original_path_len_judge = (string.len(path1) > 255) or (string.len(path2) > 255)
var new_path_len_judge = (string.len(temp2.dir + temp1.name + temp2.ext) > 255) or (string.len(temp1.dir + temp2.name + temp1.ext) > 255)
var temp_path_len_judge = (string.len(temp1.dir + "FB4715869C140FF1256EB2") > 255)
var new_path_len_judge = (string.len(temp2_dir + temp1_name + temp2_ext) > 255) or (string.len(temp1_dir + temp2_name + temp1_ext) > 255)
var temp_path_len_judge = (string.len(temp1_dir + "B5432981E3D3E8279B8616") > 255)
var judge = (original_path_len_judge or new_path_len_judge or temp_path_len_judge)
if(judge){
win.msgbox("Name is too long to set. Please Remove the Limit.","Error",,mainForm.hwnd)
Expand All @@ -68,9 +68,9 @@ change_main = function(path1,path2){
io.rename(path1,temp1_dir + temp2_name)
}
}else{
io.rename(path1,temp1_dir + "FB4715869C140FF1256EB2")
io.rename(path1,temp1_dir + "B5432981E3D3E8279B8616")
io.rename(path2,temp2_dir + temp1_name + temp2_ext)
io.rename(temp1.dir + "FB4715869C140FF1256EB2",temp1_dir + temp2_name + temp1_ext)
io.rename(temp1_dir + "B5432981E3D3E8279B8616",temp1_dir + temp2_name + temp1_ext)
}
}

Expand Down

0 comments on commit 0a3a7e3

Please sign in to comment.