OSDN Git Service
(root)
/
applistation
/
AppliStation.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
na-get-lib,ダウンロードしたインストーラファイルの権限を落とす暫定コードを追加。
[applistation/AppliStation.git]
/
na-get-lib
/
NaGet.Packages.Install
/
Installation.cs
diff --git
a/na-get-lib/NaGet.Packages.Install/Installation.cs
b/na-get-lib/NaGet.Packages.Install/Installation.cs
index
f8ab19d
..
fd0523a
100644
(file)
--- a/
na-get-lib/NaGet.Packages.Install/Installation.cs
+++ b/
na-get-lib/NaGet.Packages.Install/Installation.cs
@@
-187,6
+187,12
@@
namespace NaGet.Packages.Install
File.Move(installerFile, newFile);
\r
installerFile = newFile;
\r
}
\r
File.Move(installerFile, newFile);
\r
installerFile = newFile;
\r
}
\r
+
\r
+ // 権限を親フォルダに落とす
\r
+ try {
\r
+ string targetDir = Path.GetDirectoryName(installerFile);
\r
+ NaGet.Utils.SetAccessControlRecursive(targetDir, File.GetAccessControl(Path.GetDirectoryName(targetDir)));
\r
+ } catch (Exception) {} // 失敗時は何もしない
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-356,7
+362,7
@@
namespace NaGet.Packages.Install
}
\r
\r
/// <summary>
\r
}
\r
\r
/// <summary>
\r
- /// ã
\82
¤ã
\83
³ã
\82
¹ã
\83
\88
ã
\83
¼ã
\83
©ã
\81
®ä
¸
\80
æ
\99
\82
ä
¿
\9d
å
\98
å
\85
\88
ã
\83
\91
ã
\82
¹ã
\82
\92
ç
\94
\9f
æ
\88
\90
\r
+ /// インストーラの保存先パスを生成
\r
/// </summary>
\r
private string getArchiveFilePath()
\r
{
\r
/// </summary>
\r
private string getArchiveFilePath()
\r
{
\r
@@
-374,6
+380,11
@@
namespace NaGet.Packages.Install
}
\r
} else {
\r
Directory.CreateDirectory(folder);
\r
}
\r
} else {
\r
Directory.CreateDirectory(folder);
\r
+
\r
+ // 権限を親フォルダに合わせる
\r
+ try {
\r
+ Directory.SetAccessControl(folder, Directory.GetAccessControl(Path.GetDirectoryName(folder)));
\r
+ } catch (Exception) {} // 失敗時無視
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-462,6
+473,8
@@
namespace NaGet.Packages.Install
new FileNotFoundException(errMsg, archiveInstExe));
\r
}
\r
\r
new FileNotFoundException(errMsg, archiveInstExe));
\r
}
\r
\r
+
\r
+
\r
ProcessStartInfo procInfo = new ProcessStartInfo(archiveInstExe, archiveInstArgs);
\r
procInfo.UseShellExecute = false;
\r
procInfo.CreateNoWindow = true;
\r
ProcessStartInfo procInfo = new ProcessStartInfo(archiveInstExe, archiveInstArgs);
\r
procInfo.UseShellExecute = false;
\r
procInfo.CreateNoWindow = true;
\r